Since redirect won't set the cookie I tried a workaround:

(de signin ()
   (app)
   (action
     (html
..
(gui '(+Button) "Login"
   '(if (chkLogin (val> (: home uname)) (val> (: home pwd)))
       (redirect (pack *Domain "@desktop?+" @))
       (err "Could not login.")))
..

This correctly routes to
http://localhost:8080/@desktop?+1118474715114943738 and I set the
cookie in (desktop) instead with the help of the passed user id.
However this is what is shown on the page I redirect to:

HTTP/1.0 302 Found Server: PicoLisp Location: @signin Content-Type:
text/html Content-Length: 81
Found
HTTP/1.0 302 Found Server: PicoLisp Location: @signin Content-Type:
text/html Content-Length: 81
Found
Read all

That last "Read all" is printed if everything went according to plan,
however no articles were fetched as I would expect, otherwise they
would show underneath Read all.

Simply manually navigating to http://localhost:8080/@desktop after
this displays all the correct results. It seems I can not set the
cookie and simply retrieve its contents through the use of *Cookies in
the same request? Or does the problem have to do with the fact that
I'm redirecting from a forked process since the sign in form is using
the GUI stuff?

/Henrik
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Reply via email to