You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2003/09/04 02:52:16 UTC
DO NOT REPLY [Bug 22920] New: -
Apache should not add Content-Type header when there is no entity-body
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22920>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22920
Apache should not add Content-Type header when there is no entity-body
Summary: Apache should not add Content-Type header when there is
no entity-body
Product: Apache httpd-2.0
Version: 2.0.47
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Core
AssignedTo: bugs@httpd.apache.org
ReportedBy: jvb@prairienet.org
At least in the context of a CGI script, when there is no entity-body and the
Content-Type header is not explicitly set, Apache should not add a Content-Type
header. Several HTTP response types do not require an entity-body, and in such
a case Content-Type has no meaning and Apache should not be meddling. RFC-2616
only says that any message *containing an entity-body* should include a
Content-Type header field. It says no such thing for messages without a body.
Here is an example script:
#!/bin/sh
# test.cgi
echo 'Status: 201 Created'
echo 'Location: http://example.net/some_resource/234'
echo
The current response is:
HTTP/1.1 201 Created
Location: http://example.net/some_resource/234
Content-Type: text/plain; charset=ISO-8859-1
Content-Length: 0
The desired response is:
HTTP/1.1 201 Created
Location: http://example.net/some_resource/234
Content-Length: 0
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org