Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -r1.83 -r1.83.2.1 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 26 Feb 2005 17:52:20 -0000 1.83 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 20 May 2005 13:23:41 -0000 1.83.2.1 @@ -1927,7 +1927,7 @@ append cookie "; Expires=Mon, 01-Jan-2035 01:00:00 GMT" } } elseif { $max_age != "" } { - append cookie "; Max-Age=$max_age" + append cookie "; Max-Age=$max_age; Expires=[util::cookietime [expr [ns_time] + $max_age]]" } if { [string equal $expire "t"] } { @@ -4631,3 +4631,10 @@ ns_log Notice "util::roll_server_log: Done rolling the server log." return 0 } + +ad_proc -public util::cookietime {time} { + Return an RFC2109 compliant string for use in "Expires". +} { + regsub {, (\d+) (\S+) (\d+)} [ns_httptime $time] {, \1-\2-\3} string + return $string +}