aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client
diff options
context:
space:
mode:
authorZandra Hird <[email protected]>2015-02-05 10:11:45 +0100
committerZandra Hird <[email protected]>2015-02-05 10:11:45 +0100
commit280399ccfc3c4bd0e9c87c22bfc13045aae2bb76 (patch)
tree4b127fa0afd09feb82054d2317c1c65b466ed2a7 /lib/inets/src/http_client
parentf3a8efa2e4fa6f3f64ee38939103bfd55e78bc51 (diff)
parentead8a497f382d6b82c98721d504a5ccd40889b1c (diff)
downloadotp-280399ccfc3c4bd0e9c87c22bfc13045aae2bb76.tar.gz
otp-280399ccfc3c4bd0e9c87c22bfc13045aae2bb76.tar.bz2
otp-280399ccfc3c4bd0e9c87c22bfc13045aae2bb76.zip
Merge branch 'scrapinghub/httpc_set_cookie_with_empty_values' into maint
* scrapinghub/httpc_set_cookie_with_empty_values: inets: parse correctly 'Set-Cookie' header with empty value OTP-12455
Diffstat (limited to 'lib/inets/src/http_client')
-rw-r--r--lib/inets/src/http_client/httpc_cookie.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/inets/src/http_client/httpc_cookie.erl b/lib/inets/src/http_client/httpc_cookie.erl
index 5d71a0bb8f..ed306a84f5 100644
--- a/lib/inets/src/http_client/httpc_cookie.erl
+++ b/lib/inets/src/http_client/httpc_cookie.erl
@@ -362,6 +362,8 @@ parse_set_cookie(CookieHeader, {DefaultPath, DefaultDomain}) ->
Name = string:substr(CookieHeader, 1, Pos - 1),
{Value, Attrs} =
case string:substr(CookieHeader, Pos + 1) of
+ [] ->
+ {"", ""};
[$;|ValueAndAttrs] ->
{"", string:tokens(ValueAndAttrs, ";")};
ValueAndAttrs ->