Uh, I found what it was!

After receiving Joshua's email, I experimented some more and while trying 
to get the simplest possible configuration disabled the 'Filter' flag 
(which I had turned on because I used Apache::SSI in conjunction with 
ASP).   And this did the trick.  As soon as filtering was gone, redirects 
started working again.

Hmm, I don't think I ever mentioned that ASP post-POST redirects just all 
of a sudden stopped working for me.  A browser would send a POST request 
and never get anything back.  The logs showed that the request was 
processed to the point of $Response->Redirect, but nothing would ever come 
out from the other side.  The server was simply closing the connection 
without sending any data back to the client.  I did find a hack that made 
redirects work by replacing ASP's Redirect with the following lines:

        Apache->print("HTTP/1.0 301 Moved Permanantly\n");
        Apache->print("Location: http://www.ucsd.edu\n");
        Apache->print("\n");
        $Response->Redirect('http://mill.ucsd.edu/index.html');

(where the last line was simply used to force apache to close the 
connection) This worked as expected.

I swear this used to work before with filters on.  Did something change in 
Apache::Filter?

Thanks
Dmitry

PS I'm running Apache/1.3.12 and mod_perl/1.24 (all hand-compiled) on 
RedHat 6.2.  Apache::ASP v.0.19 (I did try the newest version, it behaved 
the same), Apache::Filter v.1.011 and Apache::SSI v.2.13

At 08:26 AM 7/7/00, Joshua Chamas wrote:

>I imagine that if you just do:
>
>  $Response->Clear();
>  $Response->Redirect();
>
>you will get what you are going for.  A POST should
>not follow a redirect.  A redirect at the top of your
>scripts should likely not need the clear, which is
>how I tend to use it.  Note with the latest release
>there is also a $Server->Transfer() which is faster
>than a redirect, and maybe useful for your needs.
>
>[...]
>
>>
>>Dmitry Beransky wrote:
>> > [...]
>> > In a mod_perl module, if I want to return a redirect after processing a
>> > POST, I need to make sure to reset the method to 'GET' and content length
>> > to 0.  How does Apache::ASP handle this case or, rather, how do I handle
>> > after POST redirects in ASP?
>> >

Reply via email to