]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Send HTTP headers and message body in a single send() call.
authorJeremy Hylton <jeremy@alum.mit.edu>
Sat, 29 Nov 2008 01:09:35 +0000 (01:09 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Sat, 29 Nov 2008 01:09:35 +0000 (01:09 +0000)
commit0381f48936b47f4b526f51a8f80787d14c9b2f93
treeab908c0ef3874c60b09127b187c7db824f4b6c13
parent21d2e59ab1581584818a713b3ed0621b59b9d92b
Send HTTP headers and message body in a single send() call.

This change addresses part of issue 4336.

Change endheaders() to take an optional message_body argument
that is sent along with the headers.  Change xmlrpclib and
httplib's other methods to use this new interface.

It is more efficient to make a single send() call, which should
get the entire client request into one packet (assuming it is
smaller than the MTU) and will avoid the long pause for delayed
ack following timeout.

Also:
- Add a comment about the buffer size for makefile().
- Extract _set_content_length() method and fix whitespace issues there.
Lib/httplib.py
Lib/xmlrpclib.py