Title: socket.error:when reading some urls in jython 2.7b1
Type: behaviour Severity: normal
Components: Core Versions: Jython 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: amak Nosy List: amak, fwierzbicki, santa4nt, straz, zyasoft
Priority: Keywords:

Created on 2013-03-03.04:24:40 by straz, last changed 2014-05-10.05:26:34 by zyasoft.

msg7896 (view) Author: Steve Strassmann (straz) Date: 2013-03-03.04:24:40
Reproducible failure to read urllib2 sockets with some URLs but not others.
Failure occurs in jython 2.7b1. (Jython 2.5.2 reads URLs ok)
Tried on Mac OS 10.8.2

To reproduce:

import urllib2

def fetch (url):
    r = urllib2.Request(url)
    f = urllib2.urlopen(r)

>>> fetch('')
 (works fine)
>>> fetch('')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 4, in fetch
  File "/opt/jython2.7b1/Lib/", line 1672, in read
    data = self._sock.recv(recv_size)
  File "/opt/jython2.7b1/Lib/", line 561, in read
    s =
  File "/opt/jython2.7b1/Lib/", line 1298, in read
    return s + - len(s))
  File "/opt/jython2.7b1/Lib/", line 1690, in read
    data = self._sock.recv(recv_size)
  File "/opt/jython2.7b1/Lib/", line 180, in set_last_error
    return method(obj, *args, **kwargs)
  File "/opt/jython2.7b1/Lib/", line 171, in map_exception
    raise _map_exception(jlx)
socket.error: [Errno 54] Software caused connection abort
msg7939 (view) Author: Santoso Wijaya (santa4nt) Date: 2013-03-18.18:53:24
I'm getting:

>>> fetch('')
msg8362 (view) Author: Jim Baker (zyasoft) Date: 2014-05-10.05:26:34
Now works on 2.7 trunk
Date User Action Args
2014-05-10 05:26:34zyasoftsetstatus: open -> closed
resolution: fixed
messages: + msg8362
nosy: + zyasoft
2013-03-18 18:53:24santa4ntsetmessages: + msg7939
2013-03-18 18:41:30santa4ntsetnosy: + santa4nt
2013-03-15 19:18:45fwierzbickisetnosy: + fwierzbicki
2013-03-10 14:05:18amaksetassignee: amak
nosy: + amak
2013-03-03 04:24:40strazcreate