[drakma-devel] How to handle persistent sessions across http-request calls?

I acknowledge that I may be doing this wrong. I have a very trivial hunchentoot server which merely returns a string containing the Hunchentoot SessionID.
From browsers, this works - subsequent requests do not result in a new session being created.
However, even (mis?) using the cookie-jar, I end up with new sessions being created. (let ((jar (make-instance 'cookie-jar))) (labels ((doit () (print (multiple-value-list (http-request http://mysite.com/:cookie-jar jar))) (print (cookie-jar-cookies jar)))) (doit) (doit) (doit) (cookie-jar-cookies jar))) The cookie seems to be replaced with each call, with a new session's cookie. I imagine hunchentoot uses cookies to track sessions - is the old cookie not being sent back? Is there something I am doing wrong? Is there a way to use Drakma to track a persistent session? The set-cookie comes back as hunchentoot-session=xx%yyy - where xx is the session number. Thanks, Matt.

On investigating further (and turning on the diagnostics) it seems that my problem is solved by having the URI refer to a file, e.g. mysite.com/blah.html, rather than mysite.com or mysite.com/ I'm no expert on cookies, and I imagine this is probably an inherent property of cookie usage semantics. Either way, I am no longer facing any difficulty in this area, sorry to bother you :)
participants (1)
-
Matthew Lamari