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.121 -r1.122 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 11 Mar 2010 14:36:51 -0000 1.121 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 15 Mar 2010 00:09:00 -0000 1.122 @@ -1873,6 +1873,7 @@ -max_age "" -domain "" -path "/" + -discard f } name {value ""} } { @@ -1902,6 +1903,9 @@ without the replace option being specified, the client will receive both copies of the cookie. + @param discard instructs the user agent to discard the + cookie when when the user agent terminates. + @param value is autmatically URL encoded. @see ad_get_cookie @@ -1928,7 +1932,9 @@ append cookie "; Path=$path" } - if { $max_age eq "inf" } { + if { $discard ne "f" } { + append cookie "; Discard" + } elseif { $max_age eq "inf" } { if { $expire ne "t" } { # netscape seemed unhappy with huge max-age, so we use # expires which seems to work on both netscape and IE @@ -1950,6 +1956,7 @@ append cookie "; Secure" } + ns_log Debug "OACS Set-Cookie: $cookie" ns_set put $headers "Set-Cookie" $cookie }