[Patches] [ python-Patches-516715 ] HTTPConnection.send() fails large reques
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 12 Feb 2002 15:44:53 -0800
Patches item #516715, was opened at 2002-02-12 15:44
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=516715&group_id=5470
Category: Library (Lib)
Group: Python 2.1.2
Status: Open
Resolution: None
Priority: 5
Submitted By: James Rucker (jamesrucker)
Assigned to: Nobody/Anonymous (nobody)
Summary: HTTPConnection.send() fails large reques
Initial Comment:
The present implementation of HTTPConnection.send() in
httplib.py does not handle the case of less than the
number of requested bytes being sent via socket.send().
Indeed, this condition occurs for fairly large
requests. In my environment, socket.send() will max
out at transferring 33011 bytes.
The routine needs to check how many bytes where
actually transferred and make subsequent socket.send()
calls until all of the data makes it through. In the
patch I've supplied, I send slices of a particular
maximum size in each iteration, rather than attempting
to send the entire remainder of data, for efficiency
(it proved expensive to have big slices being created
per call, which would happen otherwise).
I noticed that in the description of recent patches it
appears that an attempt has made to address this, but
the version of httplib.py that supposedly provides a
fix appears to make invalid references to socket.py.
If what's there is actually suitable, please do disregard.
The submitted diff is against version 1.34.2.1
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=516715&group_id=5470