summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2011-10-05 23:27:37 +0800
committerSenthil Kumaran <senthil@uthcode.com>2011-10-05 23:27:37 +0800
commit91a076a72f22e0c7ad997d46be76f7021a27ba6a (patch)
treeabc67043ab12666a8a434b6b1401acd0655843fa
parent07de325672c00351647b57f5ae7fadd85d4dd747 (diff)
parentad87fa671939609f9ff7c0d489f09a8c86586fbd (diff)
downloadcpython-git-91a076a72f22e0c7ad997d46be76f7021a27ba6a.tar.gz
merge from 3.2. Issue #13073 - Address the review comments made by Ezio.
-rw-r--r--Doc/library/http.client.rst9
-rw-r--r--Lib/http/client.py10
2 files changed, 9 insertions, 10 deletions
diff --git a/Doc/library/http.client.rst b/Doc/library/http.client.rst
index 9ef795651e..9b1ab0fdb2 100644
--- a/Doc/library/http.client.rst
+++ b/Doc/library/http.client.rst
@@ -475,11 +475,10 @@ also send your request step by step, by using the four functions below.
.. 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.
-
+ 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.
.. method:: HTTPConnection.send(data)
diff --git a/Lib/http/client.py b/Lib/http/client.py
index 57755730e9..a490e2b9f5 100644
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -947,11 +947,11 @@ class HTTPConnection:
def endheaders(self, message_body=None):
"""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
- 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.
+ This method sends the request to the server. 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 a string, otherwise it is sent as a separate
+ packet.
"""
if self.__state == _CS_REQ_STARTED:
self.__state = _CS_REQ_SENT