Issue #13073 - Address the review comments made by Ezio.

This commit is contained in:
Senthil Kumaran 2011-10-05 23:26:49 +08:00
parent 035018d078
commit ad87fa6719
2 changed files with 9 additions and 10 deletions

View File

@ -475,11 +475,10 @@ also send your request step by step, by using the four functions below.
.. method:: HTTPConnection.endheaders(message_body=None) .. method:: HTTPConnection.endheaders(message_body=None)
Send a blank line to the server, signalling the end of the headers. The 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 optional *message_body* argument can be used to pass a message body
associated with the request. The message body will be sent in associated with the request. The message body will be sent in the same
the same packet as the message headers if possible. The packet as the message headers if it is string, otherwise it is sent in a
message_body should be a string. separate packet.
.. method:: HTTPConnection.send(data) .. method:: HTTPConnection.send(data)

View File

@ -947,11 +947,11 @@ class HTTPConnection:
def endheaders(self, message_body=None): def endheaders(self, message_body=None):
"""Indicate that the last header line has been sent to the server. """Indicate that the last header line has been sent to the server.
This method sends the request to the server. The optional This method sends the request to the server. The optional message_body
message_body argument can be used to pass message body argument can be used to pass a message body associated with the
associated with the request. The message body will be sent in request. The message body will be sent in the same packet as the
the same packet as the message headers if possible. The message headers if it is a string, otherwise it is sent as a separate
message_body should be a string. packet.
""" """
if self.__state == _CS_REQ_STARTED: if self.__state == _CS_REQ_STARTED:
self.__state = _CS_REQ_SENT self.__state = _CS_REQ_SENT