httplib hung on read

ftian at cs.wisc.edu ftian at cs.wisc.edu
Mon Jul 31 16:04:24 EDT 2000


Hi,

I am using the httplib to get some webpage, it hungs sometimes
in the following senario,

http = httplib.HTTP('myhost')
http.putrequest('GET', myurl)
http.putheader(...)
http.endheaders()

errcode, errmsg, header = http.getreply()
myfile = http.getfile()
# "Still OK here"
page = myfile.read()
# Sometimes Cannot Reach here

the page can be opened with IE, and it only hungs sometimes.
Anyone know the reason?  Thanks.

Feng






More information about the Python-list mailing list