[Python-checkins] cpython: Issue #8240: Set the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag on SSL sockets.
antoine.pitrou
python-checkins at python.org
Sat May 25 13:02:41 CEST 2013
http://hg.python.org/cpython/rev/60310223d075
changeset: 83915:60310223d075
user: Antoine Pitrou <solipsis at pitrou.net>
date: Sat May 25 13:02:32 2013 +0200
summary:
Issue #8240: Set the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag on SSL sockets.
files:
Misc/NEWS | 3 +++
Modules/_ssl.c | 4 +++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -96,6 +96,9 @@
Library
-------
+- Issue #8240: Set the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag on SSL
+ sockets.
+
- Issue #17269: Workaround for socket.getaddrinfo crash on MacOS X
with port None or "0" and flags AI_NUMERICSERV.
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -490,9 +490,11 @@
PySSL_END_ALLOW_THREADS
SSL_set_app_data(self->ssl,self);
SSL_set_fd(self->ssl, sock->sock_fd);
+ SSL_set_mode(self->ssl, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER
#ifdef SSL_MODE_AUTO_RETRY
- SSL_set_mode(self->ssl, SSL_MODE_AUTO_RETRY);
+ | SSL_MODE_AUTO_RETRY
#endif
+ );
#if HAVE_SNI
if (server_hostname != NULL)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list