[erlang-bugs] Bug in http:request(): No port set in automatically-added "Host:" header

Jason Davies <>
Sat Jan 24 18:59:53 CET 2009

There is a bug in inets http:request(): it automatically adds a  
"Host:" header to comply with HTTP/1.1 but it doesn't add the port  
number.  This causes 301/302 redirects to fail on servers where the  
redirect URL is generated using the "Host:" request header.

See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23

Jason Davies


More information about the erlang-bugs mailing list