[Python-checkins] cpython (2.7): Issue13073 - Address review comments and add versionchanged information in the
senthil.kumaran
python-checkins at python.org
Wed Oct 5 17:53:11 CEST 2011
http://hg.python.org/cpython/rev/64fae6f7b64c
changeset: 72694:64fae6f7b64c
branch: 2.7
parent: 72660:504981afa007
user: Senthil Kumaran <senthil at uthcode.com>
date: Wed Oct 05 23:52:49 2011 +0800
summary:
Issue13073 - Address review comments and add versionchanged information in the docs.
files:
Doc/library/httplib.rst | 13 ++++++++-----
Lib/httplib.py | 6 +++---
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/Doc/library/httplib.rst b/Doc/library/httplib.rst
--- a/Doc/library/httplib.rst
+++ b/Doc/library/httplib.rst
@@ -494,11 +494,14 @@
.. method:: HTTPConnection.endheaders(message_body=None)
- Send a blank line to the server, signalling the end of the headers.
- The optional message_body argument can be used to pass message body
- associated with the request. The message body will be sent in
- the same packet as the message headers if possible. The
- message_body should be a string.
+ Send a blank line to the server, signalling the end of the headers. The
+ optional *message_body* argument can be used to pass a message body
+ associated with the request. The message body will be sent in the same
+ packet as the message headers if it is string, otherwise it is sent in a
+ separate packet.
+
+ .. versionchanged:: 2.7
+ *message_body* was added.
.. method:: HTTPConnection.send(data)
diff --git a/Lib/httplib.py b/Lib/httplib.py
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -939,10 +939,10 @@
"""Indicate that the last header line has been sent to the server.
This method sends the request to the server. The optional
- message_body argument can be used to pass message body
+ message_body argument can be used to pass a message body
associated with the request. The message body will be sent in
- the same packet as the message headers if possible. The
- message_body should be a string.
+ the same packet as the message headers if it is string, otherwise it is
+ sent as a separate packet.
"""
if self.__state == _CS_REQ_STARTED:
self.__state = _CS_REQ_SENT
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list