This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yuezhang
Recipients
Date 2005-09-20.05:14:25
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The problem from

http://www.thescripts.com/forum/thread25490.html

can be repeated here with python2.4.1 on WinXP. 

Test sample: sending about 5MB http data. 

It appears to be caused by line 545, httplib.py. 

            chunk = self.fp.read(amt)

It seems that reading too much from that sock causes
leak. Thus trying to edit the line making it

            chunk = self.fp.read(min(amt,50000))

the problem will be solved. //Not sure whether it was
sock error for using pure sock for http won't cause
this problem. 

If you need an example of this bug, please contact me. 

Also, the method in httplib is using string 
concatenation, which might turn slow when the strings 
are large. An alternative is using a temp list to cache 
the string sections, and join the list at last. This will be 
faster, with the draw back of some more memory 
usage. 

Best regards, 
Zhang Yue

History
Date User Action Args
2007-08-23 14:34:43adminlinkissue1296004 messages
2007-08-23 14:34:43admincreate