Bug #32
closedmod_fastcgi should accept header lines ended with "\n\n"
Description
On line 1999 in file mod_fastcgi.c,
if (NULL != (c = buffer_search_string_len(hctx->response, "\r\n\r\n", 4)))
only sequence "\r\n\r\n" was considered as the end of http header. But
the sequence "\n\n" should be considered as the end of header too. Since
this is supported by apache, many CGIs should have been written this way.
So this line will break many CGIs and cause too much trouble.
According to http://www.ietf.org/rfc/rfc1945.txt
The line terminator for HTTP-header fields is the sequence CRLF.
However, we recommend that applications, when parsing such headers,
recognize a single LF as a line terminator and ignore the leading CR.
"\n\n" should be supported.
Updated by jan about 20 years ago
- Status changed from Assigned to Fixed
- Resolution set to fixed
Should be fixed by changeset r52.
The old tests still work fine, but I don't have fastcgi code to verify that the handling of \n (even overlapped) really works.
Updated by jan about 20 years ago
Added checks for the line-ending and applied some more fixes in changeset r62
Also available in: Atom