Bug 61152 - Hardcoded message for ErrorDocument should have text/plain type
Summary: Hardcoded message for ErrorDocument should have text/plain type
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.4.18
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-04 12:31 UTC by Liam Morland
Modified: 2022-03-22 11:11 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Liam Morland 2017-06-04 12:31:47 UTC
If I set:
ErrorDocument 404 "404 Not found"
The message will be sent with header:
Content-Type: text/html; charset=iso-8859-1

Instead, it should use text/plain. People are very unlikely to put a valid HTML document between the quotes in the directive.
Comment 1 Rubén J. García Hernández 2019-05-28 16:36:22 UTC
On a related note:

I tried 
ErrorDocument 404 ""
which I think is allowed per the documentation
https://httpd.apache.org/docs/2.4/custom-error.html

However I get the following:
AH00526: Syntax error on line ...
ErrorDocument takes two arguments, Change responses for HTTP errors

ErrorDocument 404 " "
does not give an error, but it not exactly what I wanted.
Comment 2 apache.tgoeg 2022-03-22 11:11:46 UTC
Related to https://bz.apache.org/bugzilla/show_bug.cgi?id=65699