Bug 480932 - mod_cgi: error pages have wrong headers
mod_cgi: error pages have wrong headers
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: httpd (Show other bugs)
All Linux
medium Severity medium
: rc
: ---
Assigned To: Joe Orton
Depends On:
  Show dependency treegraph
Reported: 2009-01-21 08:10 EST by Tomas Smetana
Modified: 2011-02-23 04:59 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-02 07:50:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed patch (backported) (2.13 KB, patch)
2009-01-21 08:13 EST, Tomas Smetana
no flags Details | Diff

  None (edit)
Description Tomas Smetana 2009-01-21 08:10:48 EST
Description of problem:
The "500 Internal Server Error" page is not correctly displayed in case of invalid cgi script.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. yum install httpd
2. service httpd start (i.e., use default configuration)
3. echo "foo" > /var/www/cgi-bin/script.cgi
4. chmod a+x /var/www/cgi-bin/script.cgi
5. curl -is http://localhost/cgi-bin/script.cgi
6. Examine the response
Actual results:
The header looks like this (wrong Content-Length and Content-Type)

HTTP/1.1 500 Internal Server Error
Date: Wed, 21 Jan 2009 12:02:35 GMT
Server: Apache/2.2.3 (Red Hat)
Content-Length: 0
Connection: close
Content-Type: text/plain; charset=UTF-8

(and nothing else is printed by curl)

Expected results:
Something like this

HTTP/1.1 500 Internal Server Error
Date: Wed, 21 Jan 2009 12:01:18 GMT
Server: Apache/2.2.3 (Red Hat)
Content-Length: 609
Connection: close
Content-Type: text/html; charset=iso-8859-1

(and the html error document is printed)

Additional info:
This is a known problem solved in newer releases.
Upstream bug: https://issues.apache.org/bugzilla/show_bug.cgi?id=39710
Fedora bug #209605
Comment 1 Tomas Smetana 2009-01-21 08:13:18 EST
Created attachment 329600 [details]
Proposed patch (backported)
Comment 5 Chris Ward 2009-07-03 14:21:36 EDT
~~ Attention - RHEL 5.4 Beta Released! ~~

RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner!

If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity.

Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value.

Questions can be posted to this bug or your customer or partner representative.
Comment 9 errata-xmlrpc 2009-09-02 07:50:08 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.