From 2be9b5dc9b443efb495742b27823ae9cad40214f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A9ter=20Dimitrov?=
Date: Thu, 31 Jan 2019 18:01:35 +0100
Subject: inets: Ignore bracket option in format_address
Ignore the option 'ipv6_host_with_brackets' when formatting
addresses to be used in lower level functions.
Change-Id: I3b7b276b37fe129ade9208519bff226e17ae7c57
---
lib/inets/src/http_client/httpc_handler.erl | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl
index 8b356d8026..8d443a1477 100644
--- a/lib/inets/src/http_client/httpc_handler.erl
+++ b/lib/inets/src/http_client/httpc_handler.erl
@@ -805,12 +805,11 @@ handle_unix_socket_options(#request{unix_socket = UnixSocket},
error({badarg, [{ipfamily, Else}, {unix_socket, UnixSocket}]})
end.
-connect_and_send_first_request(Address, #request{ipv6_host_with_brackets = HasBrackets} = Request,
- #state{options = Options0} = State) ->
+connect_and_send_first_request(Address, Request, #state{options = Options0} = State) ->
SocketType = socket_type(Request),
ConnTimeout = (Request#request.settings)#http_options.connect_timeout,
Options = handle_unix_socket_options(Request, Options0),
- case connect(SocketType, format_address(Address, HasBrackets), Options, ConnTimeout) of
+ case connect(SocketType, format_address(Address), Options, ConnTimeout) of
{ok, Socket} ->
ClientClose =
httpc_request:is_client_closing(
@@ -1739,9 +1738,8 @@ update_session(ProfileName, #session{id = SessionId} = Session, Pos, Value) ->
{stacktrace, Stacktrace}]}}
end.
-
-format_address({Host, Port}, true) when is_list(Host)->
- {ok, Address} = inet:parse_address(string:strip(string:strip(Host, right, $]), left, $[)),
+format_address({[$[|T], Port}) ->
+ {ok, Address} = inet:parse_address(string:strip(T, right, $])),
{Address, Port};
-format_address(HostPort, _) ->
+format_address(HostPort) ->
HostPort.
--
cgit v1.2.3
From f7f7eb56bcd84a169b64def603ff6f9313f2f3dd Mon Sep 17 00:00:00 2001
From: Tobiasz
Date: Mon, 4 Feb 2019 02:57:20 +0100
Subject: Fix typo in erlang.xml
---
erts/doc/src/erlang.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 0536f4745f..6932b18571 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -8381,7 +8381,7 @@ Metadata = #{ pid => pid(),
system time that is used by the runtime system.
The list contains two-tuples with Keys
as first element, and Values as second element. The
- order if these tuples is undefined. The following
+ order of these tuples is undefined. The following
tuples can be part of the list, but more tuples can be
introduced in the future:
--
cgit v1.2.3