summaryrefslogtreecommitdiff
path: root/lib/inets/src/http_lib
diff options
context:
space:
mode:
authorJakub Witczak <kuba@erlang.org>2022-01-26 15:09:38 +0100
committerJakub Witczak <kuba@erlang.org>2022-01-26 15:09:38 +0100
commitbccbb88f6859bcdc14e26757bde07afc6f1c9ecc (patch)
treec484f43fafdaac9c0e81fb8cef16857834529836 /lib/inets/src/http_lib
parent3ad7aef13814ed5c497015199d2257de66574bee (diff)
downloaderlang-bccbb88f6859bcdc14e26757bde07afc6f1c9ecc.tar.gz
inets: remove not needed code in http_request
- http_request:normalize_host contains normalization code is handled in other places - Revert "http_request: Fix to handle undefined port in uri" This reverts commit 848642f50c315e94ef257e2c625b8088e8a3f844.
Diffstat (limited to 'lib/inets/src/http_lib')
-rw-r--r--lib/inets/src/http_lib/http_request.erl6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/inets/src/http_lib/http_request.erl b/lib/inets/src/http_lib/http_request.erl
index 02fa8acb80..dfe554c292 100644
--- a/lib/inets/src/http_lib/http_request.erl
+++ b/lib/inets/src/http_lib/http_request.erl
@@ -103,11 +103,9 @@ is_absolut_uri(_) ->
%% Description: returns a normalized Host header value, with the port
%% number omitted for well-known ports
%%-------------------------------------------------------------------------
-normalize_host(https, Host, Port) when Port =:= 443 orelse
- Port =:= undefined ->
+normalize_host(https, Host, 443 = _Port) ->
Host;
-normalize_host(http, Host, Port) when Port =:= 80 orelse
- Port =:= undefined ->
+normalize_host(http, Host, 80 = _Port) ->
Host;
normalize_host(_Scheme, Host, Port) ->
Host ++ ":" ++ integer_to_list(Port).