[issue25738] http.server doesn't handle RESET CONTENT status correctly

Martin Panter report at bugs.python.org
Sat Jun 4 20:33:36 EDT 2016


Martin Panter added the comment:

For a HEAD request, I think we should continue to send Content-Length (except in combination with one of the special responses). HEAD is slightly different to 304 Not Modified. With HEAD vs GET, the response code and other header values do not change, but the body is omitted. So it is plausible for a user to make the same send_error() call for both GET and HEAD.

With 304 Not Modified, the response code _does_ change (304 is instead of e.g. 200), although other header values are allowed to be the same. The user would have to make a different send_error() call to trigger the different response code, and the body and length that would be generated is different.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25738>
_______________________________________


More information about the Python-bugs-list mailing list