Re: CGI.pm and ModPerl::Registry
- From: steve.yost@xxxxxxxxx
- Date: Sat, 22 Dec 2007 07:47:20 -0800 (PST)
On Dec 22, 2:06 am, Claudio Calvelli
<qwertyu...@xxxxxxxxxxxxxxxxxxxxx> wrote:
On 2007-12-22, steve.y...@xxxxxxxxx <steve.y...@xxxxxxxxx> wrote:
I'm in the process of upgrading to Perl 5.8.8, Apache 2.0, and
ModPerl::Registry, and CGI.pm v3.29.
Right now, all the redirects I do that follow POSTs are broken. They
produce status 200 instead of status 303 that I coded for. Any ideas
why or other advice?
Thanks very much.
The CGI.pm documentation suggests to use redirect rather than header
to creating redirections, so something along the lines of:
print $cgi->redirect(-uri=>$otherurl, -status=>303)
should work.
C
Thanks for the reply, Claudio. That didn't help, but I did find that
the problem was resolved by not printing any text after the header.
Apparently with text printed, CGI.pm reverts that status back to 200,
which seems reasonable. If you're redirecting, you shouldn't need any
text, and if you succesfully produce a web page, it's reasonable that
the status be 200.
So the status was coming through as 200 but there was a location in
the http header, which let to the result being a page that said:
OK
The answer to your request is located here
with *here* being a link to the url I was forwarding to.
The text was legacy support for browsers that might not support
forwarding (my service has been around since 1999!).
Hope all this helps anyone else that runs into this problem.
Steve
.
- Follow-Ups:
- Re: CGI.pm and ModPerl::Registry
- From: Claudio Calvelli
- Re: CGI.pm and ModPerl::Registry
- References:
- CGI.pm and ModPerl::Registry
- From: steve . yost
- Re: CGI.pm and ModPerl::Registry
- From: Claudio Calvelli
- CGI.pm and ModPerl::Registry
- Prev by Date: Re: Is there a better way to reset CGI object for AJAX POSTDATA?
- Next by Date: Re: CGI.pm and ModPerl::Registry
- Previous by thread: Re: CGI.pm and ModPerl::Registry
- Next by thread: Re: CGI.pm and ModPerl::Registry
- Index(es):
Relevant Pages
|
|