How many CRLFs between header and body?

Brendan Taylor whateley at gmail.com
Thu Nov 22 15:53:09 EST 2007


Just ran into a problem[1]. It seems to have been introduced by
changeset 224 [2], a fix for ticket 126 [3].

The root is the number of CRLFs Camping puts between the headers and
the body of the response. This has changed at least 3 times; right now
we're back to 1. (ie. every header ends in a CRLF, and then there's the
body)

The HTTP RFC[4], the CGI spec[5] and the FastCGI FAQ[6] all seem to
agree that there should be 2 (ie. every header ends in a CRLF, then
there's another CRLF, then there's the body). (AFAIK looking for the
first CRLFCRLF is the only reliable way to tell where the headers end
and the body begins).

There's clearly a bug here, but whether it's with CGI on Apache or
FastCGI on lighttpd or Camping's handling of one or the other, I can't
say. Can anybody shed some light on the situation?

[1]: <http://code.whytheluckystiff.net/camping/ticket/147>
[2]: <http://code.whytheluckystiff.net/camping/changeset/224>
[3]: <http://code.whytheluckystiff.net/camping/ticket/126>
[4]: <http://www.apps.ietf.org/rfc/rfc2616.html#sec-6>
[5]: <http://hoohoo.ncsa.uiuc.edu/cgi/out.html>
[6]: <http://www.fastcgi.com/docs/faq.html#incomplete_headers>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/camping-list/attachments/20071122/61c7dbb9/attachment-0001.bin 


More information about the Camping-list mailing list