[Python-Dev] the new 2.3a1 settimeout() with httplib and SSL
Ben Laurie
ben@algroup.co.uk
Fri, 31 Jan 2003 16:51:04 +0000
Geoffrey Talvola wrote:
> An update:
>
> I've uploaded a new patch to set BIO to be non-blocking when necessary and
> to retry properly when the SSL error code indicates it:
> http://sourceforge.net/tracker/index.php?func=detail&aid=676472&group_id=547
> 0&atid=305470
>
> And, as a result of properly retrying on SSL_connect, it happens to also fix
> this bug when socket.setdefaulttimeout() is used in conjunction with ssl:
> http://sourceforge.net/tracker/index.php?func=detail&aid=673797&group_id=547
> 0&atid=105470
>
> I've asked Ben Laurie to review the patch for me. Once he says it looks OK
> I'll assign both the bug and the patch to Guido to deal with. Hopefully
> it's finally right.
Doesn't seem quite right to me yet - the problem is that if data arrives
1 byte at a time with just less than the timeout between each byte, then
you can get n*timeout as the actual timeout (where n is potentially very
large). You need to reduce the timeout after each select, surely?
Apart from that, it looks good. Apologies for delay, I managed to
overlook this.
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html http://www.thebunker.net/
"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff