[plt-scheme] Problem with Post-Redirect-Get in FireFox

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Thu Aug 9 16:33:20 EDT 2007

Jens Axel Søgaard wrote:
> Vladimir Zlatanov wrote:
>> what headers do you get if you simulate a post? You could inspect them 
>> with one of the many developer extensions in firefox.
> Thanks for the suggestion. I installed the FireFox Plugin LiveHTTPHeader
> and recorded this session. One thing strikes me as odd, and that is the
> the Last-Modified date for the 303s all have the same time.

I fixed the Last-Modified field, but that wasn't it either. The session 
did however bring me on the right track. Yet again I was bitten by the
use of parameters in module based servlets. I use a parameter to hold
whether the page is to be redirected or not. It is initialized to #f.
If a redirect is to happen the servlet sets it, and then later when the
response is generated, the parameter is checked to see which kind of
response is to be generated. The problem was therefore that the
parameter value wasn't reinitialized when the servlet was invoked the
second time. Why only FireFox trigged this bug in my code I am not sure.

Now the servlet works in all browsers (and I even took out the
cache headers).

Thanks to everyone for suggestions,
Jens Axel

Posted on the users mailing list.