Ummm... this should be obvious but are you redirecting to a different hostname?

In your code you're not explicitly setting the cookie domain or path, so the browser will only send the cookie to pages with the same hostname. That would explain why you don't see it on the redirect...

Note that a good browser won't allow one domain to set a cookie for another domain too - I've never tested this though.

John

cfaust-dougot wrote:
I have read that and I used to use the 2nd method on that page without any problems.. Because I'm trying to do away with CGI.pm I'm now using the 3rd method "using libapreq2' but without the content type etc when its a redirect. Because there isn't a redirect example using libapreq2, does that mean it doesn't work with redirects?? Thanks
-Chris

------------------------------------------------------------------------
*From:* Philip M. Gollucci [mailto:[EMAIL PROTECTED]
*Sent:* Sat 12/9/2006 12:26 PM
*To:* cfaust-dougot
*Cc:* Clinton Gormley; modperl@perl.apache.org
*Subject:* Re: Apache2::Cookie/APR::Request::Cookie

cfaust-dougot wrote:
> Thanks Clinton,John and Philip.. Everything is helpful.
> > Can I ask if there is something different when redirecting? It would
> appear the cookie isn't being sent in a redirect.
> > When logging in from the post form I see the "Set-Cookie" header being
> set but when I redirect them back to the URl they should be on I don't
> see the "Set-Cookie" header being set even though I pack up the cookie
> and set it again (just like in the previous POST request)
> > But does that even matter? A cookie isn't always set before its read in
> the same session, I might be looking for a cookie that was saved the
> last time you were on the site.
See these FAQs:
http://perl.apache.org/docs/2.0/user/coding/cooking.html



--
------------------------------------------------------------------------
Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com <http://ticketmaster.com/>
1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB  B89E 1324 9B4F EC88 A0BF

I never had a dream come true
'Til the day that I found you.
Even though I pretend that I've moved on
You'll always be my baby.
I never found the words to say
You're the one I think about each day
And I know no matter where life takes me to
A part of me will always be...
A part of me will always be with you.


Reply via email to