[erlang-bugs] [inets] httpc cookie parsing
Sergey Sinkovskiy
glorybox.away@REDACTED
Wed Aug 28 20:30:21 CEST 2013
Some servers send empty Set-Cookie header, which leads to process crash
with following stacktrace:
{function_clause,
[{string,substr,
[[],1,-1],
[{file,"string.erl"},{line,207}]},
{httpc_cookie,parse_set_cookie,2,
[{file,"httpc_cookie.erl"},{line,347}]},
{httpc_cookie,'-parse_set_cookies/2-lc$^1/1-1-',2,
[{file,"httpc_cookie.erl"},{line,339}]},
{httpc_cookie,cookies,3,
[{file,"httpc_cookie.erl"},{line,202}]},
{httpc_handler,handle_cookies,4,
[{file,"httpc_handler.erl"},{line,1250}]},
{httpc_handler,handle_response,1,
[{file,"httpc_handler.erl"},{line,1186}]},
{gen_server,handle_msg,5,
[{file,"gen_server.erl"},{line,604}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,239}]}]},
RFC doesn't allow header to be empty, so this isn't a bug in inets.
Could such headers be just skipped from parsing?
--
Sergey Sinkovsky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20130828/0475355b/attachment.htm>
More information about the erlang-bugs
mailing list