setting cookies in an ajax response

178 views
Skip to first unread message

harryh

unread,
Sep 12, 2009, 1:54:16 PM9/12/09
to Lift
I have an SHtml.ajaxSelect that, when executed sets a cookie:

S.addCookie(HTTPCookie("CITYID", city.id.toString))

and then returns a JsCmds.RedirectTo(uri) command. The cookie isn't
actually being set (if I look at the live http headers the Set-Cookie
line isn't sent down in the http response to the ajax call.

It's not clear to me if this is correct behavior on lift's part, of if
this is a bug.

If it is correct behavior, is there a better way to do this sort of
thing?

-harryh

marius d.

unread,
Sep 12, 2009, 7:25:59 PM9/12/09
to Lift
If it doesn't send down the cookie as you did, it sounds like a bug.
I'd fix it but I can't in the next couple of weeks.

Br's,
Marius

David Pollak

unread,
Sep 14, 2009, 3:39:38 PM9/14/09
to lif...@googlegroups.com
Please open a ticket at http://github.com/dpp/liftweb/issues
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
Reply all
Reply to author
Forward
0 new messages