diff options
author | Kirilll Zaborsky <[email protected]> | 2015-02-02 12:34:25 +0300 |
---|---|---|
committer | Zandra Hird <[email protected]> | 2015-02-03 09:24:53 +0100 |
commit | ead8a497f382d6b82c98721d504a5ccd40889b1c (patch) | |
tree | ed7122e14f3ecabfda2870a1d83c387759602510 /lib/inets/src/http_client/httpc_cookie.erl | |
parent | 0fee86f864a4ba2a7a363927a50c81c43994ca9a (diff) | |
download | otp-ead8a497f382d6b82c98721d504a5ccd40889b1c.tar.gz otp-ead8a497f382d6b82c98721d504a5ccd40889b1c.tar.bz2 otp-ead8a497f382d6b82c98721d504a5ccd40889b1c.zip |
inets: parse correctly 'Set-Cookie' header with empty value
httpc_cookie should parse cookies with empty values
and no attributes set in the 'Set-Cookie' headers.
Diffstat (limited to 'lib/inets/src/http_client/httpc_cookie.erl')
-rw-r--r-- | lib/inets/src/http_client/httpc_cookie.erl | 2 |
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 -> |