perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Koob" <mich...@michaelkoob.com>
Subject RE: Intermittent Error - Setting Cookies on POST request redirect response
Date Fri, 09 May 2003 11:15:33 GMT
James,

  I just figured the same thing out yesterday after, like yourself, many
hours spent researching. Not all the details of why, but I realized that
I was not setting the domain on my cookies and just letting it default.
So I made the changes and have not experienced the issue since. Maybe we
should have been on the Apache mailing list for this diagnosis :)

Cheers,

Michael

> -----Original Message-----
> From: James Smith [mailto:js5@sanger.ac.uk] 
> Sent: Friday, May 09, 2003 4:10 AM
> To: Michael Koob
> Cc: 'mod_perl Mailing List'
> Subject: Re: Intermittent Error - Setting Cookies on POST 
> request redirect response
> 
> 
> On Thu, 8 May 2003, Michael Koob wrote:
> 
> > I am curious if anyone has experienced this type of error. 
> The first 
> > in a series of forms is submitted. If the first form is 
> successfully 
> > submitted a cookie is set and the user is redirected to the 
> next page 
> > in the series. I have noted an error that has been difficult to 
> > diagnose. Some browsers after successfully submitting the form are 
> > redirected to the second page. The second page after noting that no 
> > cookie is present redirect the user back to the first page. 
> > Investigation shows that the request was successfully processed as 
> > expected since the browser was redirected. However, the 
> cookie was not 
> > sent/set.
> >
> 
> If you do a redirect to the same server without explicitly 
> including the domain, apache short cuts the request, and 
> doesn't send it back to the browser, but just executes and 
> returns the contents of the page redirected to. This speeds 
> up redirects considerably.... but it means (a) cookies aren't 
> set, (b) in some browsers the URL doesn't change.
> 
> To get round this you must specify the full URL including 
> domain etc in the location header, then the cookie will be set.
> 
> James
> 
> It took me a long time to work this out - and quite some time 
> learning about Apache to find out what it was....
> 


Mime
View raw message