Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 25307
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: MARKSTOS [...] cpan.org
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: PATCH: Fixes header parsing problem in ModPerl::PerlRun and ModPerl::Registry scripts
Applying the 1-line patch below to the header() method, fixes a problem I often have in ModPerl::PerlRun and ModPerl::Registry scripts where my Status headers aren't being parsed and converted into the appropriate HTTP status codes even though PerlOptions +ParseHeaders is set. I disabled the use of send_cgi_header() for mod_perl > 1. See also http:// perl.apache.org/docs/2.0/api/Apache2/Response.html#C_send_cgi_header_ ======= START OF PATCH ======== --- CGI.pm.old Sat Feb 24 00:03:16 2007 +++ CGI.pm Tue Mar 6 19:46:52 2007 @@ -1524,7 +1524,7 @@ push(@header,map {ucfirst $_} @other); push(@header,"Content-Type: $type") if $type ne ''; my $header = join($CRLF,@header)."${CRLF}${CRLF}"; - if ($MOD_PERL and not $nph) { + if (($MOD_PERL == 1) && !$nph) { $self->r->send_cgi_header($header); return ''; } ======= END OF PATCH ======== B.t.w. if needed, this is the check for the PerlOption ParseHeaders: $self->r->is_perl_option_enabled('ParseHeaders')
On Tue Mar 06 14:03:35 2007, CMANLEY wrote: Show quoted text
> Applying the 1-line patch below to the header() method, fixes a problem > I often have in ModPerl::PerlRun and ModPerl::Registry scripts where my > Status headers aren't being parsed and converted into the appropriate > HTTP status codes even though PerlOptions +ParseHeaders is set. I > disabled the use of send_cgi_header() for mod_perl > 1. See also http:// > perl.apache.org/docs/2.0/api/Apache2/Response.html#C_send_cgi_header_ > > ======= START OF PATCH ======== > --- CGI.pm.old Sat Feb 24 00:03:16 2007 > +++ CGI.pm Tue Mar 6 19:46:52 2007 > @@ -1524,7 +1524,7 @@ > push(@header,map {ucfirst $_} @other); > push(@header,"Content-Type: $type") if $type ne ''; > my $header = join($CRLF,@header)."${CRLF}${CRLF}"; > - if ($MOD_PERL and not $nph) { > + if (($MOD_PERL == 1) && !$nph) { > $self->r->send_cgi_header($header); > return ''; > } > ======= END OF PATCH ======== > > B.t.w. if needed, this is the check for the PerlOption ParseHeaders: > $self->r->is_perl_option_enabled('ParseHeaders')
Thanks for the patch. I see it was previously applied and now exists in 3.43. Mark