[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: luasocket.http and repeating headers
- From: Cosmin Apreutesei <cosmin.apreutesei@...>
- Date: Fri, 8 Jan 2010 12:07:03 +0200
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. Maybe a better idea is to put them in a table when
they are repeating, like:
http.lua, line 55:
-- save pair in table
if not headers[name] then
headers[name] = value
elseif type(headers[name])=='string' then
headers[name] = {headers[name],value}
else
headers[name][#headers[name]+1] = value
end
Regards,
Cosmin.