diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-06-08 07:16:14 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-06-08 07:16:14 (GMT) |
commit | 6af1c49bb497ca883af99db19aaaae8820325f90 (patch) | |
tree | d98b9c263bb0f1dc0df3b73221cf2acc56021258 /Doc | |
parent | c36364491fb5bedc736957ce123f30d8a7b7023c (diff) | |
download | cpython-6af1c49bb497ca883af99db19aaaae8820325f90.zip cpython-6af1c49bb497ca883af99db19aaaae8820325f90.tar.gz cpython-6af1c49bb497ca883af99db19aaaae8820325f90.tar.bz2 |
Issue #25738: Don’t send message body for 205 Reset Content
Patch by Susumu Koshiba.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/basehttpserver.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/library/basehttpserver.rst b/Doc/library/basehttpserver.rst index 01776af..0c663fe 100644 --- a/Doc/library/basehttpserver.rst +++ b/Doc/library/basehttpserver.rst @@ -197,7 +197,10 @@ to a handler. Code to create and run the server looks like this:: Sends and logs a complete error reply to the client. The numeric *code* specifies the HTTP error code, with *message* as optional, more specific text. A complete set of headers is sent, followed by text composed using the - :attr:`error_message_format` class variable. + :attr:`error_message_format` class variable. The body will be empty + if the method is HEAD or the response code is one of the following: + ``1xx``, ``204 No Content``, ``205 Reset Content``, + ``304 Not Modified``. .. method:: send_response(code[, message]) |