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

Mathieu Dupuy report at bugs.python.org
Mon Feb 15 17:47:41 EST 2016


Mathieu Dupuy added the comment:

I was looking at this issue, and actually the problem is on a different level.
The function the patch takes place is "send_errror". As its name suggests, it's only used to send error (I checked in the code : it's only used to send 4XX/5XX reply). I'm sure none of this reply forbid to carry a body.
So I think the whole "if code >= 200 and code >= 200 and                   code not in (code not in (HTTPStatus.NO_CONTENT, HTTPStatus.NOT_MODIFIED)):" should just be replaced by a assert 400 <= code < 600.

And more seriously : who could be using this code for a modern real world usage ? Why not delete it ? Isn't it harmful that unwarned might use it ?

----------
nosy: +deronnax

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


More information about the Python-bugs-list mailing list