Project

General

Profile

Actions

Bug #32

closed

mod_fastcgi should accept header lines ended with "\n\n"

Added by Anonymous about 20 years ago. Updated about 18 years ago.

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

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.

Actions #1

Updated by jan about 20 years ago

  • Status changed from New to Assigned
Actions #2

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.

Actions #3

Updated by jan about 20 years ago

Added checks for the line-ending and applied some more fixes in changeset r62

Actions #4

Updated by Anonymous over 18 years ago

-- <#NAME#>

Actions

Also available in: Atom