fritzy / SleekXMPP

Python 2.6+/3.1+ XMPP Library
http://groups.google.com/group/sleekxmpp-discussion
Other
1.1k stars 299 forks source link

socket monkey-patch appears to break other socket-using code #5

Closed incuo closed 14 years ago

incuo commented 14 years ago

For instance, urllib2: --------------------------------------------------------------------------------------------- Traceback (most recent call last): File "/home/test/py26/lib/python2.6/site-packages/test/core.py", line 978, in http_get handle = urllib2.urlopen(req) File "/usr/lib/python2.6/urllib2.py", line 124, in urlopen return _opener.open(url, data, timeout) File "/usr/lib/python2.6/urllib2.py", line 395, in open response = meth(req, response) File "/usr/lib/python2.6/urllib2.py", line 508, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.6/urllib2.py", line 427, in error result = self._call_chain(_args) File "/usr/lib/python2.6/urllib2.py", line 367, in _call_chain result = func(_args) File "/usr/lib/python2.6/urllib2.py", line 600, in http_error_302 fp.read() File "/home/test/py26/lib/python2.6/site-packages/sleekxmpp/xmlstream/filesocket.py", line 6, in read data = self._sock.recv(size) File "/usr/lib/python2.6/httplib.py", line 538, in read s = self.fp.read(amt) File "/home/test/py26/lib/python2.6/site-packages/sleekxmpp/xmlstream/filesocket.py", line 6, in read data = self._sock.recv(size) ValueError: negative buffersize in recv


(cf. http://dpaste.com/150310/)

fritzy commented 14 years ago

Fixed