summaryrefslogtreecommitdiffstats
path: root/Doc/library/http.server.rst
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-09-30 06:09:18 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2010-09-30 06:09:18 (GMT)
commit0f476d49f8d4aa84210392bf13b59afc67b32b31 (patch)
tree3598ceb150a61373b6e0b6233a9f4f68be1ebbcf /Doc/library/http.server.rst
parent748cacee469b3e0204b5f1323c22bae7a0f11e1a (diff)
downloadcpython-0f476d49f8d4aa84210392bf13b59afc67b32b31.zip
cpython-0f476d49f8d4aa84210392bf13b59afc67b32b31.tar.gz
cpython-0f476d49f8d4aa84210392bf13b59afc67b32b31.tar.bz2
Issue1491 - BaseHTTPServer incorrectly implements response code 100
Diffstat (limited to 'Doc/library/http.server.rst')
-rw-r--r--Doc/library/http.server.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/Doc/library/http.server.rst b/Doc/library/http.server.rst
index 1ca1620..2f28012 100644
--- a/Doc/library/http.server.rst
+++ b/Doc/library/http.server.rst
@@ -155,6 +155,17 @@ of which this module provides three different variants:
This method will parse and dispatch the request to the appropriate
:meth:`do_\*` method. You should never need to override it.
+ .. method:: handle_expect_100()
+
+ When a HTTP/1.1 compliant server receives a ``Expect: 100-continue``
+ request header it responds back with a ``100 Continue`` followed by ``200
+ OK`` headers.
+ This method can be overridden to raise an error if the server does not
+ want the client to continue. For e.g. server can chose to send ``417
+ Expectation Failed`` as a response header and ``return False``.
+
+ .. versionadded:: 3.2
+
.. method:: send_error(code, message=None)
Sends and logs a complete error reply to the client. The numeric *code*
@@ -174,6 +185,15 @@ of which this module provides three different variants:
Writes a specific HTTP header to the output stream. *keyword* should
specify the header keyword, with *value* specifying its value.
+ .. method:: send_response_only(code, message=None)
+
+ Sends the reponse header only, used for the purposes when ``100
+ Continue`` response is sent by the server to the client. If the *message*
+ is not specified, the HTTP message corresponding the response *code* is
+ sent.
+
+ .. versionadded:: 3.2
+
.. method:: end_headers()
Sends a blank line, indicating the end of the HTTP headers in the