[ python-Bugs-1058059 ] Can't read some http URLs using neither
urllib, nor urllib2
SourceForge.net
noreply at sourceforge.net
Mon Nov 1 14:37:02 CET 2004
Bugs item #1058059, was opened at 2004-11-01 11:47
Message generated for change (Comment added) made by doerwalter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1058059&group_id=5470
Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Vsevolod Novikov (nnseva)
Assigned to: Nobody/Anonymous (nobody)
Summary: Can't read some http URLs using neither urllib, nor urllib2
Initial Comment:
HTTP connection maden by urllib, as well as by urllib2,
on some URL sleeps forever (until timeout happens) on
reading from the socket.
The popular Linux 'wget' utility behaviour is the same.
The Mozilla browser, as well as Internet Explorer
browser read this URL successfully, over proxy, as well
as directly.
The example URL is:
http://nds.nokia.com/uaprof/N3510ir100.xml
The example code is:
import urllib2
u =
urllib2.urlopen('http://nds.nokia.com/uaprof/N3510ir100.xml')
print u.info()
print '-------------'
for l in u :
print l
The urllib library does the same.
Info list was (on the moment when I tried it last time):
Accept-Ranges: bytes
Date: Mon, 01 Nov 2004 10:29:58 GMT
Content-Length: 9710
Content-Type: text/plain
Cache-Control: no-cache
Server: Netscape-Enterprise/4.1
X-WR-FLAGS: CCHOMode=7200:0:force
Etag: "acbd4f76-6-25ee-40910c98"
Last-modified: Thu, 29 Apr 2004 14:09:28 GMT
Via: 1.1 saec-nokp02ca (NetCache NetApp/5.3.1R2)
I have no idea why it happens. May be, the HTTP server
waits some additional headers? In any case, it is not a
good behaviour of the library, I think.
----------------------------------------------------------------------
>Comment By: Walter Dörwald (doerwalter)
Date: 2004-11-01 14:37
Message:
Logged In: YES
user_id=89016
Work here without any problems:
Python 2.3.4 (#2, Sep 29 2004, 18:56:11)
[GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-113)] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> import urllib
>>> d = urllib.urlopen
("http://nds.nokia.com/uaprof/N3510ir100.xml").read()
>>> len(d)
9710
>>> d[:30]
'<?xml version="1.0"?>\n<!-- ==='
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1058059&group_id=5470
More information about the Python-bugs-list
mailing list