Multiple message-header fields handling

Igor Sysoev is at
Wed Oct 3 10:28:57 MSD 2007

On Tue, Oct 02, 2007 at 10:02:38PM +0200, Manlio Perillo wrote:

> I have found a "problem" with multiple message-header fields handling in 
> Nginx.
> The HTTP 1.1 protocol (section 4.2) says that:
> """Multiple message-header fields with the same field-name MAY be 
> present in a message if and only if the entire field-value for that 
> header field is defined as a comma-separated list [i.e., #(values)]."""
> This can happen, as an example, with the Cookie header.
> The "problem" is that Nginx does not combines these multiple headers:
> """It MUST be possible to combine the multiple header fields into one 
> "field-name: field-value" pair, without changing the semantics of the 
> message, by appending each subsequent field-value to the first, each 
> separated by a comma. The order in which header fields with the same 
> field-name are received is therefore significant to the interpretation 
> of the combined field value, and thus a proxy MUST NOT change the order 
> of these field values when a message is forwarded."""
> Igor, do you plan to add this feature in a future version?

nginx does not join headers as Apache does.
However, all headers are passed to a proxied server/etc as is if they
are not overwritten.
As to the cookies nginx treats them specially and $http_cookie includes
all Cookie header fields.

Igor Sysoev

More information about the nginx mailing list