[plt-scheme] cookie path issue in Safari

From: Rob Hunter (rob.hunter at gmail.com)
Date: Thu Jan 31 17:35:36 EST 2008

I'm having an issue with cookies in Safari.  I've implemented a simple
authentication system, and my problem is that in Safari, I'm logged
out after a few (less than 10) requests.  I believe the problem is due
to a bogus "Path" setting in the cookie that I am sending to the
browser.  I'd like to send the path


but instead I'm sending


While Firefox presumably is receiving the quoted path (because the
same code is executed), it doesn't show up quoted when I look at my
cookies in Firefox.  (And, sure enough, Firefox does not exhibit the

I've dug into the code a bit, and the relevant file is
collects/net/cookie-unit.ss.  The function to-rfc2109:value is called
on the path string that I provide, which in turn calls
convert-to-quoted which is responsible for turning my Scheme string
"/" into "\"/\"".  Anyone know what's going on here?  The adding of
the extra quotes seems to be quite intentional, and yet it seems to be
causing problems in Safari.  Is this a Safari bug, perhaps?


Posted on the users mailing list.