homepage

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 wichert
Recipients wichert
Date 2012年05月16日.08:54:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1337158473.64.0.398540003062.issue14826@psf.upfronthosting.co.za>
In-reply-to
Content
There appears to be an odd networking issue with how urllib2 sends HTTP requests. Downloading an image from maw.liquifire.com gives an error:
$ python -c 'import urllib2 ; urllib2.urlopen("http://maw.liquifire.com/maw?set=image[2302.000.13314 a]&call=url[file:325x445]")'
Traceback (most recent call last):
 File "<string>", line 1, in <module>
 File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
 return _opener.open(url, data, timeout)
 File "/usr/lib/python2.7/urllib2.py", line 400, in open
 response = self._open(req, data)
 File "/usr/lib/python2.7/urllib2.py", line 418, in _open
 '_open', req)
 File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
 result = func(*args)
 File "/usr/lib/python2.7/urllib2.py", line 1207, in http_open
 return self.do_open(httplib.HTTPConnection, req)
 File "/usr/lib/python2.7/urllib2.py", line 1180, in do_open
 r = h.getresponse(buffering=True)
 File "/usr/lib/python2.7/httplib.py", line 1030, in getresponse
 response.begin()
 File "/usr/lib/python2.7/httplib.py", line 407, in begin
 version, status, reason = self._read_status()
 File "/usr/lib/python2.7/httplib.py", line 365, in _read_status
 line = self.fp.readline()
 File "/usr/lib/python2.7/socket.py", line 447, in readline
 data = self._sock.recv(self._rbufsize)
socket.error: [Errno 104] Connection reset by peer
Downloading the same image using wget works fine:
$ wget 'http://maw.liquifire.com/maw?set=image[2302.000.13314 a]&call=url[file:325x445]' 
--2012年05月16日 10:53:27-- http://maw.liquifire.com/maw?set=image[2302.000.13314%20a]&call=url[file:325x445]
Resolving maw.liquifire.com (maw.liquifire.com)... 184.169.78.6
Connecting to maw.liquifire.com (maw.liquifire.com)|184.169.78.6|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11393 (11K) [image/jpeg]
Saving to: `maw?set=image[2302.000.13314 a]&call=url[file:325x445]'
100%[======================================>] 11,393 --.-K/s in 0.003s 
2012年05月16日 10:53:27 (3.49 MB/s) - `maw?set=image[2302.000.13314 a]&call=url[file:325x445]' saved [11393/11393]
History
Date User Action Args
2012年05月16日 08:54:33wichertsetrecipients: + wichert
2012年05月16日 08:54:33wichertsetmessageid: <1337158473.64.0.398540003062.issue14826@psf.upfronthosting.co.za>
2012年05月16日 08:54:33wichertlinkissue14826 messages
2012年05月16日 08:54:32wichertcreate

AltStyle によって変換されたページ (->オリジナル) /