Return-Path: Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 79650 invoked by uid 500); 9 May 2003 11:16:00 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 79638 invoked from network); 9 May 2003 11:16:00 -0000 From: "Michael Koob" To: "'James Smith'" Cc: "'mod_perl Mailing List'" Subject: RE: Intermittent Error - Setting Cookies on POST request redirect response Date: Fri, 9 May 2003 07:15:33 -0400 Message-ID: <01a801c3161c$4fb56850$cd4cfea9@koobn600c> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal In-Reply-To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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.... >