Project

General

Profile

Actions

Bug #2308

closed

lighttpd adds cr lf to fastcgi output

Added by tdeseyn about 13 years ago. Updated about 13 years ago.

Status:
Invalid
Priority:
Normal
Category:
-
Target version:
-
ASK QUESTIONS IN Forums:

Description

Hi,

I have created a fastcgi application which sends '1' at continuous intervals.
On the client I receive '1\r\n' instead of '1'.

strace of lighttpd makes me believe that lighttpd is adding the '\r\n', since it does not show up on the data read from the fcgi socket but it does on the data written to the client.

read(7, "\1\6\0\1\0\1\7\0001\0\0\0\0\0\0\0", 16) = 16
setsockopt(6, SOL_TCP, TCP_CORK, [1], 4) = 0
writev(6, [{"1\r\n", 3}, {"1", 1}, {"\r\n", 2}], 3) = 6

Is this a bug or the expected behavior?

I am using:
lighttpd/1.4.26 (ssl) - a light and fast webserver
Build-Date: Jul 18 2010 01:15:37

Thanks for your help,
Wkr,

Tom

Actions #1

Updated by stbuehler about 13 years ago

  • Category deleted (mod_fastcgi)
  • Status changed from New to Invalid
  • Target version deleted (1.4.x)

http chunked encoding.

Actions #2

Updated by tdeseyn about 13 years ago

stbuehler wrote:

http chunked encoding.

Thanks.
It all looked like ones to me since the chunk length was also 1.

Actions #3

Updated by tdeseyn about 13 years ago

Is it possible to disable the chunk encoding?

I would like to send Server-Sent-Events, and the standard suggests it is preferable to disable chunking.
In the Notes section of http://dev.w3.org/html5/eventsource/:
"Authors are also cautioned that HTTP chunking can have unexpected negative effects on the reliability of this protocol. Where possible, chunking should be disabled for serving event streams unless the rate of messages is high enough for this not to matter."

Wkr,

Tom

Actions

Also available in: Atom