An error page "500 Internal Server Error" caused by bad CGI script is sent with content-type text/plain by default (or other content-type which is determined by DefaultType option in httpd.conf). Version-Release number of selected component (if applicable): httpd-2.2.2-1.2 How reproducible: Always Steps to Reproduce: 1. Setup a httpd server with default configuration 2. echo "echo test" > /var/www/cgi-bin/test.cgi 3. chmod a+x /var/www/cgi-bin/test.cgi 4. lynx http://localhost/cgi-bin/test.cgi Actual results: Alert!: HTTP/1.1 500 Internal Server Error <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body> <h1>Internal Server Error</h1> <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> <hr> <address>Apache/2.2.2 (Fedora) Server at localhost Port 80</address> </body></html> Expected results: Alert!: HTTP/1.1 500 Internal Server Error Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Apache/2.2.2 (Fedora) Server at localhost Port 80 Additional info: If DefaultType is "text/html" then this error page is sent with this content-type, which happens to be correct. But this is not a good choice for DefaultType. I've tried to set DefaultType and ForceType for <Directory /var/www/error> and <Location /error/> and uncomment ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var but it did not work.
Retested on: httpd-2.2.4-4.1.fc7 (Fedora 7) httpd-2.2.3-7.el5.centos (CentOS5, so also RedHat5) Both still affected.
httpd-2.2.6-1.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.