lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, 8 Jan 2010, Diego Nehab wrote:
>
> > Just noticed that luasocket.http concatenates repeating headers with a
> > comma which makes them impossible to parse if the header value itself
> > contains a comma.
>
> Do you have a specific case in mind? If so, please be more
> specific. I believe cookies with dates can be parsed without
> any problem, if that is what you are talking about.

Not all headers can be combined in this way. RFC 2616 says:

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

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
GERMAN BIGHT HUMBER: SOUTHWEST 5 TO 7. MODERATE OR ROUGH. SQUALLY SHOWERS.
MODERATE OR GOOD.