From 141ff3c087ca856d21d0395ae9d31401028fd64b Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 27 May 2010 14:27:05 +0000 Subject: OTP-8609: Made cookie handling more case insensitive. OTP-8610: Some netscape cookie dates are given with a 2-digit year. --- lib/inets/src/http_client/httpc_cookie.erl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/inets/src/http_client/httpc_cookie.erl') 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 -> -- cgit v1.2.3