httplib continuation packets

Fredrik Lundh fredrik at pythonware.com
Sun Nov 12 00:03:20 CET 2006


Haakon Riiser wrote:

> Yes, and it doesn't help.

then the server is mostly likely broken beyond repair.

> By the way, this is the closest thing I've found in the bug tracker:
> https://sourceforge.net/tracker/?func=detail&atid=105470&aid=547093&group_id=5470
> The bug was closed in 2002 with this comment:
> 
>   "I changed httplib to send requests as a single packet in rev
>    1.60.  The change was made to address a performance problem,
>    but happens to fix the problem you had with the bogus
>    server, too."
> 
> Has someone changed it back since then?

nope; that change buffers the *header* part of the request to avoid 
problems with certain TCP/IP mechanisms; see

     http://svn.python.org/view?rev=27644&view=rev

for a discussion.  note that there's still no guarantee that the entire 
header is sent in a single TCP packet.

to see if this really is the problem, you could try moving the call to 
self._send_output() from the end of the endheaders() method to the end 
of the _send_request() method (around line 870 in httplib.py, at least 
in 2.5).

</F>




More information about the Python-list mailing list