Message73342
As discussed on the python-dev ml I noticed something in the ssl.py code
which seems to be wrong. This is the ssl.SSLSocket.recv() method:
def recv (self, buflen=1024, flags=0):
if self._sslobj:
if flags != 0:
raise ValueError(
"non-zero flags not allowed in calls to sendall()
on %s" %
self.__class__)
while True:
try:
return self.read(buflen)
except SSLError, x:
if x.args[0] == SSL_ERROR_WANT_READ:
continue
else:
raise x
else:
return socket.recv(self, buflen, flags)
I don't know the low levels but that while statement which continues
in case of SSL_ERROR_WANT_READ seems to be wrong (blocking), at least
when dealing with non-blocking sockets. I think the proper way of
doing recv() here is letting SSL_ERROR_WANT_READ propagate and let the
upper application (e.g. asyncore) deal with it. |
|
Date |
User |
Action |
Args |
2008-09-17 20:35:53 | giampaolo.rodola | set | recipients:
+ giampaolo.rodola, josiahcarlson, janssen, josiah.carlson |
2008-09-17 20:35:52 | giampaolo.rodola | set | messageid: <1221683752.69.0.81133093826.issue3890@psf.upfronthosting.co.za> |
2008-09-17 20:35:51 | giampaolo.rodola | link | issue3890 messages |
2008-09-17 20:35:50 | giampaolo.rodola | create | |
|