Project

General

Profile

Bug #2308

lighttpd adds cr lf to fastcgi output

Added by tdeseyn almost 9 years ago. Updated almost 9 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-04-12
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:
No

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

#1

Updated by stbuehler almost 9 years ago

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

http chunked encoding.

#2

Updated by tdeseyn almost 9 years ago

stbuehler wrote:

http chunked encoding.

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

#3

Updated by tdeseyn almost 9 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

Also available in: Atom