Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 3996 invoked from network); 3 Jun 2008 10:17:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jun 2008 10:17:53 -0000 Received: (qmail 76935 invoked by uid 500); 3 Jun 2008 10:17:49 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 76897 invoked by uid 500); 3 Jun 2008 10:17:49 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 76881 invoked by uid 99); 3 Jun 2008 10:17:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2008 03:17:49 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.75.72.5] (HELO newmail.resfeber.se) (212.75.72.5) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2008 10:16:57 +0000 Received: from [10.10.11.247] (unknown [10.10.11.247]) by newmail.resfeber.se (Postfix) with ESMTP id A5598B3A89 for ; Tue, 3 Jun 2008 12:16:59 +0200 (CEST) Message-ID: <48451A20.7030408@travelocitynordic.com> Date: Tue, 03 Jun 2008 12:17:04 +0200 From: =?ISO-8859-1?Q?M=E5rten_Svantesson?= User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: modperl@perl.apache.org Subject: [mp2] "did not send an HTTP header" due to (involuntary) flush Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org We are migrating a big site from mod_perl1 to mod_perl2. The site originally was written as CGIs so headers are mostly set with print statements. The Content-Type are mostly printed in the end of the script. The problem is that we occassionally start processes from the scripts and then the output gets flushed and thus we get Internal Server Error with the message "did not send an HTTP header" in the error.log. I tried to write an output filter that merge all buckets until \n\n is encountered, but I don't seem to be able to insert the filter so that it executes before the mod_perl header parsing. Looking in the mailing list archive it seems like this problem was extensively discussed in the thread "[mp2] CGI redirects incorrectly handled?" back in March 2003. In the final mail of the thread Stas mentions possible future changes to alleviate the problem. Has anything of this been implemented? Or does anybody have any other idea how to solve this (without rewriting our scripts, which are *many*)? We are now running mod_perl 2.0.2 (the version available in RedHat EL) in Apache 2.2.3. Our configuration: SetHandler perl-script PerlFixupHandler Apache2::SizeLimit PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders -- M�rten Svantesson