Subject: | Running under mod_perl breaks some scripts, by sending headers whenever sub header is called |
Perl 5.8.6, CGI.pm 3.10 on Fedora Core 4 (also seen on Fedora Core 1). Mod_perl2 in use on Apache2
--- CGI.pm.orig 2005-11-02 16:25:52.000000000 +0000
+++ CGI.pm 2005-11-02 16:26:05.000000000 +0000
@@ -1451,10 +1451,6 @@
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) {
- $self->r->send_cgi_header($header);
- return '';
- }
return $header;
}
END_OF_FUNC
fixes it; the script is not an NPH script, but I get headers with $headers = $query->header(-content-type="text/xml"), manipulate them, then try and print them. Those four lines prevent me doing so, and instead leave me with a blank set of headers.