[PATCH stable] httpclient (experimental): use blocking socket for ssl wrapping (issue3268)

Antoine Pitrou solipsis at pitrou.net
Fri May 18 16:19:57 CDT 2012


On Fri, 18 May 2012 21:50:51 +0200
Mads Kiilerich <mads at kiilerich.com> wrote:
> # HG changeset patch
> # User Mads Kiilerich <mads at kiilerich.com>
> # Date 1337370545 -7200
> # Branch stable
> # Node ID a24a034227e6d23985b406e6a006bb751967963a
> # Parent  c20efe04cd7a265dc3b0f28ac56a88f5d9af8859
> httpclient (experimental): use blocking socket for ssl wrapping (issue3268)
> 
> httpclient use non-blocking sockets, but ssl.wrap_socket apparently requires
> blocking sockets ... but apparently only when the socket has been used before,
> for example for proxy CONNECT.

Can you elaborate on "requires blocking sockets"?
It's true that the behaviour of non-blocking SSL sockets can sometimes
seem a bit surprising, see
http://docs.python.org/py3k/library/ssl.html#notes-on-non-blocking-sockets

(also, it's possible that there were bugs before Python 2.6)

Regards

Antoine.




More information about the Mercurial-devel mailing list