aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2010-05-27 16:51:34 +0000
committerErlang/OTP <[email protected]>2010-05-27 16:51:34 +0000
commit78d1baddbaaf73762da3557d1f6bb2dc036d1e3b (patch)
treee4962183a75e65cde8a52ff1bc79f262e43030eb
parentc2535851c84a2de16b9dcdf651fb5f9686860155 (diff)
downloadotp-78d1baddbaaf73762da3557d1f6bb2dc036d1e3b.tar.gz
otp-78d1baddbaaf73762da3557d1f6bb2dc036d1e3b.tar.bz2
otp-78d1baddbaaf73762da3557d1f6bb2dc036d1e3b.zip
OTP-8609: Problems processing netscape cookies - expire
OTP-8610: Problem processing netscape cookies - date OTP-8624: Documented debug options not handled
-rw-r--r--lib/inets/src/http_lib/http_util.erl31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/inets/src/http_lib/http_util.erl b/lib/inets/src/http_lib/http_util.erl
index 96571296da..4f1147176c 100644
--- a/lib/inets/src/http_lib/http_util.erl
+++ b/lib/inets/src/http_lib/http_util.erl
@@ -101,6 +101,37 @@ convert_netscapecookie_date([_D,_A,_Y, $ ,
Hour = list_to_integer([H1,H2]),
Min = list_to_integer([M1,M2]),
Sec = list_to_integer([S1,S2]),
+ {{Year,Month,Day},{Hour,Min,Sec}};
+
+%% Sloppy...
+convert_netscapecookie_date([_D,_A,_Y, $,, _SP,
+ D1,D2,_DA,
+ M,O,N,_DA,
+ Y1,Y2,Y3,Y4,_SP,
+ H1,H2,_Col,
+ M1,M2,_Col,
+ S1,S2|_Rest]) ->
+ Year=list_to_integer([Y1,Y2,Y3,Y4]),
+ Day=list_to_integer([D1,D2]),
+ Month=convert_month([M,O,N]),
+ Hour=list_to_integer([H1,H2]),
+ Min=list_to_integer([M1,M2]),
+ Sec=list_to_integer([S1,S2]),
+ {{Year,Month,Day},{Hour,Min,Sec}};
+
+convert_netscapecookie_date([_D,_A,_Y, _SP,
+ D1,D2,_DA,
+ M,O,N,_DA,
+ Y1,Y2,Y3,Y4,_SP,
+ H1,H2,_Col,
+ M1,M2,_Col,
+ S1,S2|_Rest]) ->
+ Year=list_to_integer([Y1,Y2,Y3,Y4]),
+ Day=list_to_integer([D1,D2]),
+ Month=convert_month([M,O,N]),
+ Hour=list_to_integer([H1,H2]),
+ Min=list_to_integer([M1,M2]),
+ Sec=list_to_integer([S1,S2]),
{{Year,Month,Day},{Hour,Min,Sec}}.
hexlist_to_integer([]) ->