aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-12-13 18:23:23 +0100
committerIngela Anderton Andin <[email protected]>2016-12-14 18:02:38 +0100
commit3018e0c0df040524de17cba97314f32e9c63214f (patch)
tree00b3557b91fea8df8408beafc3382d7ef32ab719 /lib/inets/src/http_client
parent3473ecd83a7bbe7e0bebb865f25dddb93e3bf10f (diff)
downloadotp-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/http_client')
-rw-r--r--lib/inets/src/http_client/httpc_response.erl2
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,