Bug 42525 - Content-Type: header f...ed up on 500 Internal Server Error
Summary: Content-Type: header f...ed up on 500 Internal Server Error
Status: RESOLVED DUPLICATE of bug 39710
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.2.3
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL: http://backsla.sh/test/test.py
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-26 10:51 UTC by Robert Siemer
Modified: 2007-05-26 11:31 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Siemer 2007-05-26 10:51:46 UTC
Imagine a CGI script that does not work as expected and makes the Apache web
server respond with a 500 Internal Server Error. At least in this case (maybe
other 500, too) the server gets the Content-Type: header wrong:

Result:
HTTP/1.1 500 Internal Server Error
...
Content-Type: text/x-python

Expected:
...
Content-Type: text/html


It seems that the web server sets the Content-Type to the mime-type of the CGI
source file.

Even "ErrorDocument ..." with or without "ForceType text/html" have no influence.

Because of this, Firefox and other browsers offer a download dialog instead of
displaying the error...
Comment 1 Nick Kew 2007-05-26 11:31:06 UTC
Long overdue to apply the simple fix.

*** This bug has been marked as a duplicate of 39710 ***