Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: [OT] 302 redirect after login result cookie lost?

by atemon (Chaplain)
on Oct 12, 2007 at 02:49 UTC ( [id://644369]=note: print w/replies, xml ) Need Help??


in reply to [OT] 302 redirect after login result cookie lost?

Hi,

Sorry to say that you can not set cookie for redirection. The redirection header is

Status: 302 Moved Location: www.my-redirected-domain.com # uri in $q->redirect will come + here
I.e. server is instructing the user agent (browser) that the url now looking for is moved (302) to the new location asnd please look at the new location for the page. The referrer has nothing to do with new page. So if you want to set cookie for the new page, you need to set it in the new page itself, NOT in the referrer. You may send some parameters to the new page to set cookies for that page.

--VC



There are three sides to any argument.....
your side, my side and the right side.

Replies are listed 'Best First'.
Re^2: [OT] 302 redirect after login result cookie lost?
by tinita (Parson) on Oct 12, 2007 at 12:31 UTC
    Sorry to say that you can not set cookie for redirection.
    i looked into the RFC and couldn't find any statement that forbids that: http://www.faqs.org/rfcs/rfc2616.html
    besides that (which is of course no proof) my ie4linux, opera, firefox, lynx and w3m can do it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://644369]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (1)
As of 2024-04-19 18:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found