MemoryError in httplib
ZhangYue张岳
zhangyue99 at tsinghua.org.cn
Fri Sep 16 05:47:52 EDT 2005
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.
Best regards.
ZhangYue张岳
zhangyue99 at tsinghua.org.cn
2005-09-16
More information about the Python-list
mailing list