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

Susumu Koshiba report at bugs.python.org
Sat Jun 4 15:05:22 EDT 2016


Susumu Koshiba added the comment:

Thanks a lot for a quick review. I've created a new patch with below changes.
 1. No content-length and the body to be sent for:
     a. 204(No Content)
     b. 205(Reset Content)
     c. 304(Not Modified)
     d. response to HEAD request method
     e. 1xx
 2. Documentation change to remove version changed, in case we are making this patch to 2.7 and 3.5

I've added test cases for most of the scenarios mentioned above, but the behavior of 100(Continue) is left out due to the fact that sending 100(Continue) via send_error() gets tricky as it's not meant to close the connection after sending this response. I'm a bit undecided about the handling of 100(Continue) code in send_error() so I'll leave it as-is for now and possibly file a separate ticket depending on what we decide to do.

Happy to patch 2.7, 3.5 as a bug fix also.

----------
Added file: http://bugs.python.org/file43203/issue25738_http_reset_content_03.patch

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


More information about the Python-bugs-list mailing list