diff options
author | Ingela Anderton Andin <[email protected]> | 2017-04-04 16:25:39 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2017-04-04 16:25:39 +0200 |
commit | c04e4cd533d9a4185eadda3141e0783b0f5a0fae (patch) | |
tree | fe4796bf3371069132cf591b7524ba48adf6a4cf /lib/inets/src/http_client/httpc_response.erl | |
parent | 38cd77b3e7afbf3973167c5a339381707e3d95bc (diff) | |
parent | d25ad84195ca42969fbfb017a52aab8c8effc246 (diff) | |
download | otp-c04e4cd533d9a4185eadda3141e0783b0f5a0fae.tar.gz otp-c04e4cd533d9a4185eadda3141e0783b0f5a0fae.tar.bz2 otp-c04e4cd533d9a4185eadda3141e0783b0f5a0fae.zip |
Merge branch 'maint-19' into maint
Diffstat (limited to 'lib/inets/src/http_client/httpc_response.erl')
-rw-r--r-- | lib/inets/src/http_client/httpc_response.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/inets/src/http_client/httpc_response.erl b/lib/inets/src/http_client/httpc_response.erl index 0fd5faa466..5fbceb8ad0 100644 --- a/lib/inets/src/http_client/httpc_response.erl +++ b/lib/inets/src/http_client/httpc_response.erl @@ -362,8 +362,9 @@ redirect(Response = {StatusLine, Headers, Body}, Request) -> {ok, error(Request, Reason), Data}; %% Automatic redirection {ok, {Scheme, _, Host, Port, Path, Query}} -> + HostPort = http_request:normalize_host(Scheme, Host, Port), NewHeaders = - (Request#request.headers)#http_request_h{host = Host++":"++integer_to_list(Port)}, + (Request#request.headers)#http_request_h{host = HostPort}, NewRequest = Request#request{redircount = Request#request.redircount+1, |