Commit c1c87aa4 authored by Éric Araujo's avatar Éric Araujo

Branch merge

parents 97cada6a 64276a31
...@@ -494,11 +494,14 @@ also send your request step by step, by using the four functions below. ...@@ -494,11 +494,14 @@ 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. Send a blank line to the server, signalling the end of the headers. The
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.
.. versionchanged:: 2.7
*message_body* was added.
.. method:: HTTPConnection.send(data) .. method:: HTTPConnection.send(data)
......
...@@ -939,10 +939,10 @@ class HTTPConnection: ...@@ -939,10 +939,10 @@ class HTTPConnection:
"""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 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 associated with the request. The message body will be sent in
the same packet as the message headers if possible. The the same packet as the message headers if it is string, otherwise it is
message_body should be a string. sent as a separate packet.
""" """
if self.__state == _CS_REQ_STARTED: if self.__state == _CS_REQ_STARTED:
self.__state = _CS_REQ_SENT self.__state = _CS_REQ_SENT
......
...@@ -282,11 +282,11 @@ class TraceTestCase(unittest.TestCase): ...@@ -282,11 +282,11 @@ class TraceTestCase(unittest.TestCase):
self.compare_events(func.func_code.co_firstlineno, self.compare_events(func.func_code.co_firstlineno,
tracer.events, func.events) tracer.events, func.events)
def set_and_retrieve_none(self): def test_set_and_retrieve_none(self):
sys.settrace(None) sys.settrace(None)
assert sys.gettrace() is None assert sys.gettrace() is None
def set_and_retrieve_func(self): def test_set_and_retrieve_func(self):
def fn(*args): def fn(*args):
pass pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment