[IronPython] 2.6.1 implements ssl module, but it crash...

Dino Viehland dinov at microsoft.com
Thu Apr 15 01:39:28 CEST 2010


My guess is that the exception we’re reporting is either of the wrong type or doesn’t have the right information.  ssl.SSLSocket.read is catching SSLError and it looks like we’d probably throw a socket.SocketError instead.

I’ve opened this bug: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=26778

Thanks for beating on ssl – it obviously still has a few rough edges but hopefully we can collect them all and get them fixed.

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of qiuyingbo at sohu.com
Sent: Wednesday, April 14, 2010 3:04 AM
To: Discussion of IronPython
Subject: Re: [IronPython] 2.6.1 implements ssl module, but it crash...

I noticed that there is a wrap_socket() argument: suppress_ragged_eofs

The parameter suppress_ragged_eofs specifies how the SSLSocket.read() method should signal unexpected EOF from the other end of the connection. If specified as True<constants.html#True> (the default), it returns a normal EOF in response to unexpected EOF errors raised from the underlying socket; if False<constants.html#False>, it will raise the exceptions back to the caller.

But not working

----- 原文 -----

发件人: qiuyingbo at sohu.com
主 题: Re: [IronPython] 2.6.1 implements ssl module, but it crash...
时 间: 2010年4月14日 11:48:07

I traced the bug and found it occurred when our imap server close connection after imap authentication.

It seems that SSLSocket.read() cannot raise exception in this situation. It return 0.

Then IMAP4_SSL.readline() go into infiniteloop:

        def readline(self):
            """Read line from remote."""
            line = []
            while 1:
                char = self.sslobj.read(1)
                line.append(char)
                if char == "\n": return ''.join(line)

I would modify imaplib.py to resolve the problem. But I think it's a bug of SSLSocket.read(), right?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100414/07b648c1/attachment.html>


More information about the Ironpython-users mailing list