diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-11-21 14:36:14 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-11-21 14:36:14 (GMT) |
commit | e4dad4f8e239be6d9d1fd3e5398584a7d2a14edb (patch) | |
tree | ff6526bd9de4fe65ec484ca7f5e0fd029b858897 /Doc/library | |
parent | a73dc9d5e8ba2320a5aebf8c24ab665ccdfed5f8 (diff) | |
download | cpython-e4dad4f8e239be6d9d1fd3e5398584a7d2a14edb.zip cpython-e4dad4f8e239be6d9d1fd3e5398584a7d2a14edb.tar.gz cpython-e4dad4f8e239be6d9d1fd3e5398584a7d2a14edb.tar.bz2 |
Fix issue3709 - BaseHTTPRequestHandler will buffer the headers and write only on end_headers call.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/http.server.rst | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/Doc/library/http.server.rst b/Doc/library/http.server.rst index 2f28012..f68d220 100644 --- a/Doc/library/http.server.rst +++ b/Doc/library/http.server.rst @@ -182,22 +182,29 @@ of which this module provides three different variants: .. method:: send_header(keyword, value) - Writes a specific HTTP header to the output stream. *keyword* should - specify the header keyword, with *value* specifying its value. + Stores the HTTP header to an internal buffer which will be written to the + output stream when :meth:`end_headers` method is invoked. + *keyword* should specify the header keyword, with *value* + specifying its value. + + .. versionchanged:: 3.2 Storing the headers in an internal buffer + .. 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. + Continue`` response is sent by the server to the client. The headers not + buffered and sent directly the output stream.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 - response. + Write the buffered HTTP headers to the output stream and send a blank + line, indicating the end of the HTTP headers in the response. + + .. versionchanged:: 3.2 Writing the buffered headers to the output stream. .. method:: log_request(code='-', size='-') |