aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2017-11-27 16:42:14 +0100
committerPéter Dimitrov <[email protected]>2017-11-28 10:42:32 +0100
commit175e1fa414b6609e83da2d4b3ab44bbdca754ede (patch)
tree21c190b493bd1d923dff7f28b2904a6a64758dc0 /lib/inets/src
parent9dffbcc0e659d2e2ad7afc0bffe622f2e6c81ea4 (diff)
downloadotp-175e1fa414b6609e83da2d4b3ab44bbdca754ede.tar.gz
otp-175e1fa414b6609e83da2d4b3ab44bbdca754ede.tar.bz2
otp-175e1fa414b6609e83da2d4b3ab44bbdca754ede.zip
inets: Fix httpc path handling
Fixed handling of URL paths that contain space (%20) characters. Change-Id: Ic09691e35c70ee005af7637a6ec3ae588097bec1
Diffstat (limited to 'lib/inets/src')
-rw-r--r--lib/inets/src/http_client/httpc.erl4
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),