durusmail: quixote-users: Setting cookies while redirecting
wierd TypeError caused by http_request.get_header
2004-08-28
2004-08-28
2004-08-30
2004-08-30
2004-08-30
Setting cookies while redirecting
2004-08-31
2004-08-31
2004-08-31
2004-08-31
2004-08-31
2004-08-31
2004-09-01
2004-09-03
2004-09-06
2004-09-06
2004-09-06
2004-08-31
Setting cookies while redirecting
Jason E. Sibre
2004-08-31
I've had bad luck with trying to get browsers to accept cookies that are set
in the same response as a redirect, even using things other than Quixote
(most recently, it was Cold Fusion)...

See section 3.3.6 in this document for more info than you ever wanted:
http://www.faqs.org/rfcs/rfc2965.html

Jason




> -----Original Message-----
> From: quixote-users-bounces@mems-exchange.org
> [mailto:quixote-users-bounces@mems-exchange.org]On Behalf Of alanp
> Sent: Tuesday, August 31, 2004 2:07 AM
> To: quixote-users@mems-exchange.org
> Subject: [Quixote-users] Setting cookies while redirecting
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> This question is a little premature as i haven't delved into the
> quixote code yet but thought i'd ask anyway :-)
>
> i want to set a cookie and redirect the client in the same response.
> The code is something along the lines of
> def method [html] (request):
>     # A bunch of other operations unrelated to the cookie or redirect....
>     request.response.set_cookie("chocchip", "123")
>     return request.redirect(....)
>
> The browser is duly redirected but the cookie isn't set. If i replace
> the "return request.redirect(...)" with a simple page, the cookie is
> set.
>
> A quick glance through http_request.py & http_response.py seems to tell
> me that cookies are included in the headers sent during a redirect (i
> think).
>
> Any hints on what i'm doing wrong (before i start plowing through the
> code and HTTP RFC)?
>
> Thanks
> alan
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (Darwin)
>
> iD8DBQFBNCObKJDmEytdZIcRAkBLAJ48l6nnRqFXYdpqLzkA9JrdBpKCSgCePv1r
> Ha4s07/8mJuf5SI6EtA8d5M=
> =33zO
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Quixote-users mailing list
> Quixote-users@mems-exchange.org
> http://mail.mems-exchange.org/mailman/listinfo/quixote-users
>


reply