(original) (raw)
changeset: 72693:a7b7ba225de7 parent: 72691:c2127d79f7c1 parent: 72692:befa7b926aad user: Senthil Kumaran senthil@uthcode.com date: Wed Oct 05 23:27:37 2011 +0800 files: Lib/http/client.py description: merge from 3.2. Issue #13073 - Address the review comments made by Ezio. diff -r c2127d79f7c1 -r a7b7ba225de7 Doc/library/http.client.rst --- a/Doc/library/http.client.rst Wed Oct 05 16:47:38 2011 +0200 +++ b/Doc/library/http.client.rst Wed Oct 05 23:27:37 2011 +0800 @@ -475,11 +475,10 @@ .. 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 -r c2127d79f7c1 -r a7b7ba225de7 Lib/http/client.py --- a/Lib/http/client.py Wed Oct 05 16:47:38 2011 +0200 +++ b/Lib/http/client.py Wed Oct 05 23:27:37 2011 +0800 @@ -947,11 +947,11 @@ 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 /senthil@uthcode.com