diff options
author | Ingela Anderton Andin <[email protected]> | 2016-12-13 18:23:23 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2016-12-14 18:02:38 +0100 |
commit | 3018e0c0df040524de17cba97314f32e9c63214f (patch) | |
tree | 00b3557b91fea8df8408beafc3382d7ef32ab719 /lib/inets/src | |
parent | 3473ecd83a7bbe7e0bebb865f25dddb93e3bf10f (diff) | |
download | otp-3018e0c0df040524de17cba97314f32e9c63214f.tar.gz otp-3018e0c0df040524de17cba97314f32e9c63214f.tar.bz2 otp-3018e0c0df040524de17cba97314f32e9c63214f.zip |
inets: httpc - Correct redirection host header
RFC2616 Sect 14.23: The Host request-header field specifies the
Internet host AND port number.
Diffstat (limited to 'lib/inets/src')
-rw-r--r-- | lib/inets/src/http_client/httpc_response.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/inets/src/http_client/httpc_response.erl b/lib/inets/src/http_client/httpc_response.erl index d8bdac24e3..0fd5faa466 100644 --- a/lib/inets/src/http_client/httpc_response.erl +++ b/lib/inets/src/http_client/httpc_response.erl @@ -363,7 +363,7 @@ redirect(Response = {StatusLine, Headers, Body}, Request) -> %% Automatic redirection {ok, {Scheme, _, Host, Port, Path, Query}} -> NewHeaders = - (Request#request.headers)#http_request_h{host = Host}, + (Request#request.headers)#http_request_h{host = Host++":"++integer_to_list(Port)}, NewRequest = Request#request{redircount = Request#request.redircount+1, |