CGI->redirect patch
Mike Stok <mike@stok.co.uk> wrote:
> I am having an odd problem with a redirect using apacha & mod perl.
>
> #!/usr/local/register/bin/perl -w
>
> use CGI::Switch;
>
> my $q = new CGI::Switch;
>
> $q->print ($q->redirect (-uri => 'http://vrooom.nis.newscorp.com:8008/',
> -nph => 1));
>
> as a "regular" cgi script works OK, but under mod_perl gets a "document
> contains no data" error out of the browser. When under mod_perl I have
> the code in .../register/code/boing ans the httpd.conf file says
[...]
> Is there some simple mistake I'm making? I'm using perl 5.003_95 and
> mod_perl 0.95_02 with apache 1.2b7 ... changing the versions fills me with
> terror as I'm < 24 hours away from a product roll out and the code works
> OK as CGI.
nuts, I should have done something about this a while ago. See, CGI
reads your scripts output, scanning headers and such. mod_perl does
not. This patch should makes things behave as expected.
p5p-msgid:
199704041732.MAA05896@postman.osf.org
private-msgid:
199704051527.KAA11280@postman.osf.org