<div dir="ltr">Some servers send empty Set-Cookie header, which leads to process crash with following stacktrace:<div><br></div><div><div><font face="courier new, monospace">{function_clause,</font></div><div><font face="courier new, monospace"> [{string,substr,</font></div>
<div><font face="courier new, monospace"> [[],1,-1],</font></div>
<div><font face="courier new, monospace"> [{file,"string.erl"},{line,207}]},</font></div><div><font face="courier new, monospace"> {httpc_cookie,parse_set_cookie,2,</font></div>
<div><font face="courier new, monospace"> [{file,"httpc_cookie.erl"},{line,347}]},</font></div>
<div><font face="courier new, monospace"> {httpc_cookie,'-parse_set_cookies/2-lc$^1/1-1-',2,</font></div><div><font face="courier new, monospace"> [{file,"httpc_cookie.erl"},{line,339}]},</font></div>
<div><font face="courier new, monospace"> {httpc_cookie,cookies,3,</font></div>
<div><font face="courier new, monospace"> [{file,"httpc_cookie.erl"},{line,202}]},</font></div><div><font face="courier new, monospace"> {httpc_handler,handle_cookies,4,</font></div>
<div><font face="courier new, monospace"> [{file,"httpc_handler.erl"},{line,1250}]},</font></div>
<div><font face="courier new, monospace"> {httpc_handler,handle_response,1,</font></div><div><font face="courier new, monospace"> [{file,"httpc_handler.erl"},{line,1186}]},</font></div>
<div><font face="courier new, monospace"> {gen_server,handle_msg,5,</font></div><div><font face="courier new, monospace">
[{file,"gen_server.erl"},{line,604}]},</font></div><div><font face="courier new, monospace"> {proc_lib,init_p_do_apply,3,</font></div><div><font face="courier new, monospace"> [{file,"proc_lib.erl"},{line,239}]}]},</font></div>
<div><br></div><div>RFC doesn't allow header to be empty, so this isn't a bug in inets.</div><div>Could such headers be just skipped from parsing?</div><div><br></div>-- <br>Sergey Sinkovsky
</div></div>