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: 31931
Status: resolved
Priority: 0/
Queue: CGI

Owner: Nobody in particular
Requestors: cpan [...]

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

Subject: CGI sends premature headers on mod_perl 2
We have updated to v3.31 on our development servers and some of our programs (those that run under mod_perl 2) now send the headers prematurely. In our research, we've tried a lot of changes on our code without success. As a last effort, we changed one line on and everything works now. We still aren't sure if this is a bug. Anyway, here goes our findings. Line 40: $MOD_PERL = 0; Line 190-1: if (exists $ENV{MOD_PERL_API_VERSION} && $ENV{MOD_PERL_API_VERSION} == 2) { $MOD_PERL = 2; Line 197-8: } else { $MOD_PERL = 1; Line 1525: if (($MOD_PERL==1) && !$nph) { If we change this last line to: if(($MOD_PERL>=1) && !$nph) { headers are sent correctly. diff: 1525c1525 < if (($MOD_PERL==1) && !$nph) { --- Show quoted text
> if (($MOD_PERL>=1) && !$nph) {
------------------ $ perl -v This is perl, v5.8.8 built for i486-linux-thread-multi $ perl -MCGI -le 'print CGI->version' 3.31 $ apachectl -v Server version: Apache/2.2.6 (Unix) Server built: Sep 20 2007 19:35:34 'MOD_PERL' => 'mod_perl/2.0.3', 'MOD_PERL_API_VERSION' => 2,
The proposed fix looks right. I am adding this to version 3.32 right now.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to