summaryrefslogtreecommitdiffstats
path: root/Doc/library/http.server.rst
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2013-03-15 14:53:21 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2013-03-15 14:53:21 (GMT)
commit2688644eef0766ddb22695664e76fe567ceabac5 (patch)
treecb7abef878a28fc916b68476de5c7ffed19efbaf /Doc/library/http.server.rst
parent12bb353d43e69f4ec1bd9959261aedddbe760f7d (diff)
downloadcpython-2688644eef0766ddb22695664e76fe567ceabac5.zip
cpython-2688644eef0766ddb22695664e76fe567ceabac5.tar.gz
cpython-2688644eef0766ddb22695664e76fe567ceabac5.tar.bz2
#1291 http.server's send_error takes an optional explain argument
Diffstat (limited to 'Doc/library/http.server.rst')
-rw-r--r--Doc/library/http.server.rst12
1 files changed, 8 insertions, 4 deletions
diff --git a/Doc/library/http.server.rst b/Doc/library/http.server.rst
index 0577d5e..3154f8e 100644
--- a/Doc/library/http.server.rst
+++ b/Doc/library/http.server.rst
@@ -170,15 +170,19 @@ of which this module provides three different variants:
.. versionadded:: 3.2
- .. method:: send_error(code, message=None)
+ .. method:: send_error(code, message=None, explain=None)
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.
+ specifies the HTTP error code, with *message* as optional, more specific
+ text, usually referring to short message response. The *explain*
+ argument can be used to send a detailed information about the error in
+ response content body. A complete set of headers is sent, followed by
+ text composed using the :attr:`error_message_format` class variable.
.. versionchanged:: 3.4
The error response includes a Content-Length header.
+ explain argument was added.
+
.. method:: send_response(code, message=None)