diff options
author | Péter Dimitrov <[email protected]> | 2017-12-01 11:14:23 +0100 |
---|---|---|
committer | Péter Dimitrov <[email protected]> | 2017-12-01 11:14:23 +0100 |
commit | 2973263a033b0e20123f8a316935e052695da1de (patch) | |
tree | 904ef17efad4f17574fc2e3e80421b03ae15481d /lib/inets/src/http_client/httpc.erl | |
parent | 76c4821cff1e91c26dd2f812fc8cb40aa7d48e57 (diff) | |
parent | 175e1fa414b6609e83da2d4b3ab44bbdca754ede (diff) | |
download | otp-2973263a033b0e20123f8a316935e052695da1de.tar.gz otp-2973263a033b0e20123f8a316935e052695da1de.tar.bz2 otp-2973263a033b0e20123f8a316935e052695da1de.zip |
Merge branch 'peterdmv/inets/fix-httpc/OTP-14799'
* peterdmv/inets/fix-httpc/OTP-14799:
inets: Fix httpc path handling
Diffstat (limited to 'lib/inets/src/http_client/httpc.erl')
-rw-r--r-- | lib/inets/src/http_client/httpc.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl index 2efe2c2858..821eb7f02f 100644 --- a/lib/inets/src/http_client/httpc.erl +++ b/lib/inets/src/http_client/httpc.erl @@ -319,7 +319,7 @@ store_cookies(SetCookieHeaders, Url, Profile) Scheme = scheme_to_atom(maps:get(scheme, URI, '')), Host = maps:get(host, URI, ""), Port = maps:get(port, URI, default_port(Scheme)), - Path = maps:get(path, URI, ""), + Path = uri_string:recompose(#{path => maps:get(path, URI, "")}), %% Since the Address part is not actually used %% by the manager when storing cookies, we dont %% care about ipv6-host-with-brackets. @@ -539,7 +539,7 @@ handle_request(Method, Url, Host = http_util:maybe_add_brackets(maps:get(host, URI, ""), BracketedHost), Port = maps:get(port, URI, default_port(Scheme)), Host2 = http_request:normalize_host(Scheme, Host, Port), - Path = maps:get(path, URI, ""), + Path = uri_string:recompose(#{path => maps:get(path, URI, "")}), Query = add_question_mark(maps:get(query, URI, "")), HeadersRecord = header_record(NewHeaders, Host2, HTTPOptions), |