summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-06-08 07:16:14 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-06-08 07:16:14 (GMT)
commit6af1c49bb497ca883af99db19aaaae8820325f90 (patch)
treed98b9c263bb0f1dc0df3b73221cf2acc56021258 /Doc
parentc36364491fb5bedc736957ce123f30d8a7b7023c (diff)
downloadcpython-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.rst5
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])