aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client/httpc_response.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2017-04-04 16:44:13 +0200
committerIngela Anderton Andin <[email protected]>2017-04-04 17:18:22 +0200
commitfbe1980e5ca85e516648420e0fed0d00b20a0529 (patch)
tree76047c17f037a01d8447f8fd2e5e204d134a141a /lib/inets/src/http_client/httpc_response.erl
parenteaf6a1477c4cd812eb31814cc09bdf14c796a9ba (diff)
parentc04e4cd533d9a4185eadda3141e0783b0f5a0fae (diff)
downloadotp-fbe1980e5ca85e516648420e0fed0d00b20a0529.tar.gz
otp-fbe1980e5ca85e516648420e0fed0d00b20a0529.tar.bz2
otp-fbe1980e5ca85e516648420e0fed0d00b20a0529.zip
Merge branch 'maint'
Conflicts: OTP_VERSION erts/vsn.mk lib/crypto/c_src/crypto.c lib/crypto/src/crypto.erl lib/ssh/src/ssh.erl
Diffstat (limited to 'lib/inets/src/http_client/httpc_response.erl')
-rw-r--r--lib/inets/src/http_client/httpc_response.erl3
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 d24705a845..d81afde5fe 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,