Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c1c87aa4
Commit
c1c87aa4
authored
Oct 06, 2011
by
Éric Araujo
Browse files
Options
Browse Files
Download
Plain Diff
Branch merge
parents
97cada6a
64276a31
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
10 deletions
+13
-10
Doc/library/httplib.rst
Doc/library/httplib.rst
+8
-5
Lib/httplib.py
Lib/httplib.py
+3
-3
Lib/test/test_sys_settrace.py
Lib/test/test_sys_settrace.py
+2
-2
No files found.
Doc/library/httplib.rst
View file @
c1c87aa4
...
...
@@ -494,11 +494,14 @@ 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.
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)
...
...
Lib/httplib.py
View file @
c1c87aa4
...
...
@@ -939,10 +939,10 @@ class HTTPConnection:
"""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
...
...
Lib/test/test_sys_settrace.py
View file @
c1c87aa4
...
...
@@ -282,11 +282,11 @@ class TraceTestCase(unittest.TestCase):
self
.
compare_events
(
func
.
func_code
.
co_firstlineno
,
tracer
.
events
,
func
.
events
)
def
set_and_retrieve_none
(
self
):
def
test_
set_and_retrieve_none
(
self
):
sys
.
settrace
(
None
)
assert
sys
.
gettrace
()
is
None
def
set_and_retrieve_func
(
self
):
def
test_
set_and_retrieve_func
(
self
):
def
fn
(
*
args
):
pass
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment