Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:23
erlang
0875-inets-remove-not-needed-code-in-http_reque...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0875-inets-remove-not-needed-code-in-http_request.patch of Package erlang
From bccbb88f6859bcdc14e26757bde07afc6f1c9ecc Mon Sep 17 00:00:00 2001 From: Jakub Witczak <kuba@erlang.org> Date: Wed, 26 Jan 2022 15:09:38 +0100 Subject: [PATCH 2/2] 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. --- lib/inets/src/http_lib/http_request.erl | 6 ++---- lib/inets/test/httpc_SUITE.erl | 7 ------- 2 files changed, 2 insertions(+), 11 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). diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl index e24370ac9e..567d16cd44 100644 --- a/lib/inets/test/httpc_SUITE.erl +++ b/lib/inets/test/httpc_SUITE.erl @@ -136,7 +136,6 @@ real_requests()-> invalid_method, no_scheme, invalid_uri, - undefined_port, binary_url ]. @@ -1376,12 +1375,6 @@ invalid_uri(Config) -> {error, invalid_uri} = httpc:request(URL), ok. -%%------------------------------------------------------------------------- - -undefined_port(_Config) -> - {error, {failed_connect, _Reason}} = httpc:request("http://:"), - ok. - %%------------------------------------------------------------------------- remote_socket_close(Config) when is_list(Config) -> -- 2.31.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor