aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorZandra Hird <[email protected]>2015-02-05 10:15:06 +0100
committerZandra Hird <[email protected]>2015-02-05 10:15:06 +0100
commitae5d5db20fe1d9b4cae2a19717ef010be1b8097f (patch)
tree6a3a803fb3b5d47b9771f51e2afbb3a14a4d2407 /lib
parent8af91b0fed1bebafb7096782a3cc0b02a2d9b62f (diff)
parent280399ccfc3c4bd0e9c87c22bfc13045aae2bb76 (diff)
downloadotp-ae5d5db20fe1d9b4cae2a19717ef010be1b8097f.tar.gz
otp-ae5d5db20fe1d9b4cae2a19717ef010be1b8097f.tar.bz2
otp-ae5d5db20fe1d9b4cae2a19717ef010be1b8097f.zip
Merge branch 'maint'
Diffstat (limited to 'lib')
-rw-r--r--lib/inets/src/http_client/httpc_cookie.erl2
-rw-r--r--lib/inets/test/httpc_SUITE.erl1
2 files changed, 3 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 ->
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index 197491aefe..0e89e831fb 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -1738,6 +1738,7 @@ handle_uri(_,"/empty_set_cookie.html",_,_,_,_) ->
handle_uri(_,"/invalid_set_cookie.html",_,_,_,_) ->
"HTTP/1.1 200 ok\r\n" ++
"set-cookie: =\r\n" ++
+ "set-cookie: name=\r\n" ++
"set-cookie: name-or-value\r\n" ++
"Content-Length:32\r\n\r\n"++
"<HTML><BODY>foobar</BODY></HTML>";