aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2010-05-27 14:27:05 +0000
committerErlang/OTP <[email protected]>2010-05-27 14:27:05 +0000
commit141ff3c087ca856d21d0395ae9d31401028fd64b (patch)
treed1b745988f0d318ee8e61870b973936ac4464cf9 /lib/inets/src/http_client
parent02e434b8befb2696adc98f23bcc195e1ae0539c3 (diff)
downloadotp-141ff3c087ca856d21d0395ae9d31401028fd64b.tar.gz
otp-141ff3c087ca856d21d0395ae9d31401028fd64b.tar.bz2
otp-141ff3c087ca856d21d0395ae9d31401028fd64b.zip
OTP-8609: Made cookie handling more case insensitive.
OTP-8610: Some netscape cookie dates are given with a 2-digit year.
Diffstat (limited to 'lib/inets/src/http_client')
-rw-r--r--lib/inets/src/http_client/httpc_cookie.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/inets/src/http_client/httpc_cookie.erl b/lib/inets/src/http_client/httpc_cookie.erl
index 586701b4a1..4d61f82b5a 100644
--- a/lib/inets/src/http_client/httpc_cookie.erl
+++ b/lib/inets/src/http_client/httpc_cookie.erl
@@ -476,13 +476,13 @@ path_sort(Cookies)->
lists:reverse(lists:keysort(#http_cookie.path, Cookies)).
-%% Informally, the Set-Cookie response header comprises the token
-%% Set-Cookie:, followed by a comma-separated list of one or more
-%% cookies. Netscape cookies expires attribute may also have a
-%% , in this case the header list will have been incorrectly split
-%% in parse_set_cookies/2 this functions fixs that problem.
+%% Informally, the Set-Cookie response header comprises the token
+%% Set-Cookie:, followed by a comma-separated list of one or more
+%% cookies. Netscape cookies expires attribute may also have a,
+%% in this case the header list will have been incorrectly split
+%% in parse_set_cookies/2 this functions fix that problem.
fix_netscape_cookie([Cookie1, Cookie2 | Rest], Acc) ->
- case inets_regexp:match(Cookie1, "expires=") of
+ case inets_regexp:match(string:to_lower(Cookie1), "expires=") of
{_, _, _} ->
fix_netscape_cookie(Rest, [Cookie1 ++ Cookie2 | Acc]);
nomatch ->