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
Oleg Broytmann
2004-08-31
On Tue, Aug 31, 2004 at 01:40:30PM +0200, alanp wrote:
> On 31 Aug 2004, at 1:17 PM, Jason E. Sibre wrote:
>
> >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
>
> i skim-read RFC2965 a few days ago and missed that section; thanks for
> pointing it out. That'll teach me to study the RFCs properly before
> writing code.
>
> So i guess i'll have to resort to returning a page which then does an
> immediate refresh to the actual page? Ugly :-(
>
> Anyone have better/other suggestions?

   I am more stupid than you! I often do set-cookie+redirect in web
applications (all sorts of web apps - CGIs, Quixote, Zope) and never had
a problem. Of course I always set cookie and redirect to the same host:

Content-Type: text/html
Set-Cookie: shookie=chookie; path=/
Location: http://www.example.org/accepts/cookie

"Dummy body of the redirect... I recommend to put here"

   All of my web applications start with set-cookie/test-cookie pair of
CGIs/scripts/whatever, and all browsers I have tested (all versions of
lynx, links2, elinks, Mozilla, Opera, M$IE) passed the test.

   What am I doing wrong?!

Oleg.
--
     Oleg Broytmann            http://phd.pp.ru/            phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

reply