aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_lib
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-09-23 16:13:43 +0200
committerMicael Karlberg <[email protected]>2011-09-23 16:13:43 +0200
commit1ead5e977d307ae391fdfd34e28fa5d587db2855 (patch)
treeb5324d56ca67a1f427b876f03536d98025f31945 /lib/inets/src/http_lib
parent92657321ac647f343c6b88985d66a2d611fd982d (diff)
parent55bb3e1faf613c51ec59c9ee7ab4b4e967f30fda (diff)
downloadotp-1ead5e977d307ae391fdfd34e28fa5d587db2855.tar.gz
otp-1ead5e977d307ae391fdfd34e28fa5d587db2855.tar.bz2
otp-1ead5e977d307ae391fdfd34e28fa5d587db2855.zip
Merge branch 'dev' into major
Conflicts: lib/inets/doc/src/notes.xml lib/inets/src/inets_app/inets.appup.src lib/inets/test/httpc_cookie_SUITE.erl lib/inets/vsn.mk
Diffstat (limited to 'lib/inets/src/http_lib')
-rw-r--r--lib/inets/src/http_lib/http_util.erl16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/inets/src/http_lib/http_util.erl b/lib/inets/src/http_lib/http_util.erl
index 5511ed388d..973600d7be 100644
--- a/lib/inets/src/http_lib/http_util.erl
+++ b/lib/inets/src/http_lib/http_util.erl
@@ -104,6 +104,22 @@ convert_netscapecookie_date([_D,_A,_Y, $ ,
Sec = list_to_integer([S1,S2]),
{{Year,Month,Day},{Hour,Min,Sec}};
+%% Example: Tue Jan 01 08:00:01 2036 GMT
+convert_netscapecookie_date([_D,_A,_Y, $ ,
+ M,O,N, $ ,
+ D1,D2, $ ,
+ H1,H2, $:,
+ M1,M2, $:,
+ S1,S2, $ ,
+ Y1,Y2,Y3,Y4, $ |_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}};
+
%% Sloppy...
convert_netscapecookie_date([_D,_A,_Y, $,, _SP,
D1,D2,_DA,