[IronPython] urllib.urlretrieve with IronPython 2a8
Curt Hagenlocher
curt at hagenlocher.org
Mon Feb 18 16:12:04 PST 2008
On Feb 18, 2008 3:34 PM, Curt Hagenlocher <curt at hagenlocher.org> wrote:
>
> Here's a simpler way to reproduce the problem:
>
> import httplib
> h = httplib.HTTP('www.google.com')
> h.putrequest('GET', '/')
> h.endheaders()
> a, b, c = h.getreply()
> fp = h.getfile()
> fp.read(1024*8)
Turning debugging on at a Python level reveals a crucial difference
between the sites. Sites for which the HTTP header contains
"Connection: close" fail, while sites for which the HTTP header
contains "Connection: keep-alive" stay open.
Is it possible that CPython's socket.close method won't actually close
the socket while there's still a makefile'd file attacked to the
underlying OS socket? And that IronPython's will? Because that's the
only explanation I can come up with.
--
Curt Hagenlocher
curt at hagenlocher.org
More information about the Users
mailing list