Multiple message-header fields handling

Manlio Perillo manlio_perillo at libero.it
Wed Oct 3 21:42:54 MSD 2007


Igor Sysoev ha scritto:
> [...]
> 
> Actually requests with multi line headers are seldom.
> 

Thanks, this is a good news.

>>>>> As to the cookies nginx treats them specially and $http_cookie includes
>>>>> all Cookie header fields.
>>>>>
>>>> Cookies are a mess.
>>>> Does nginx apply some for of preprocessing?
>>> I do not understand the question.
>> http://kristol.org/cookie/errata.html
> 
> I still do not understand.
> $http_cookie joins cookies using "; " without any processing, see
> ngx_http_variable_headers().
> 

Sorry.
What I meant is that, in HTTP 1.1, only headers with values separed by
"," can be splitted on multiple lines:

"""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)]"""


However the Cookie header uses ";" as the separator.


P.S.
reading the RFC 2965, I see a:
cookie  =  "Cookie:" cookie-version 1*((";" | ",") cookie-value)

so it seems that both ";" and "," can be used...




Manlio Perillo





More information about the nginx mailing list