aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client/httpc.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2017-04-04 16:25:39 +0200
committerIngela Anderton Andin <[email protected]>2017-04-04 16:25:39 +0200
commitc04e4cd533d9a4185eadda3141e0783b0f5a0fae (patch)
treefe4796bf3371069132cf591b7524ba48adf6a4cf /lib/inets/src/http_client/httpc.erl
parent38cd77b3e7afbf3973167c5a339381707e3d95bc (diff)
parentd25ad84195ca42969fbfb017a52aab8c8effc246 (diff)
downloadotp-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.erl')
-rw-r--r--lib/inets/src/http_client/httpc.erl10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl
index bd5f6df39e..418b6247b0 100644
--- a/lib/inets/src/http_client/httpc.erl
+++ b/lib/inets/src/http_client/httpc.erl
@@ -524,7 +524,7 @@ handle_request(Method, Url,
Options = request_options(Options0),
Sync = proplists:get_value(sync, Options),
Stream = proplists:get_value(stream, Options),
- Host2 = header_host(Scheme, Host, Port),
+ Host2 = http_request:normalize_host(Scheme, Host, Port),
HeadersRecord = header_record(NewHeaders, Host2, HTTPOptions),
Receiver = proplists:get_value(receiver, Options),
SocketOpts = proplists:get_value(socket_opts, Options),
@@ -1035,14 +1035,6 @@ bad_option(Option, BadValue) ->
throw({error, {bad_option, Option, BadValue}}).
-header_host(https, Host, 443 = _Port) ->
- Host;
-header_host(http, Host, 80 = _Port) ->
- Host;
-header_host(_Scheme, Host, Port) ->
- Host ++ ":" ++ integer_to_list(Port).
-
-
header_record(NewHeaders, Host, #http_options{version = Version}) ->
header_record(NewHeaders, #http_request_h{}, Host, Version).