This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients dsiroky, giampaolo.rodola, pitrou
Date 2011-06-10.17:11:11
SpamBayes Score 4.4852566e-10
Marked as misclassified No
Message-id <1307725872.77.0.389106860281.issue12197@psf.upfronthosting.co.za>
In-reply-to
Content
I don't see any discrepancy here (with Python 3.3). Under both Linux and Windows, the client thread prints:

ERR [Errno 3] _ssl.c:1126: The operation did not complete (write)
done

The only difference is that the server thread receives 128KB under Linux, and 48KB under Windows.

I think the main variation comes not from OpenSSL, but from the OS's thread scheduling algorithms. If you do a large write, you have to be prepared to get an error, because the buffers may be too small.

I agree it might seem strange that OpenSSL returns an error rather than the number of sent bytes, and this behaviour could actually be changed at the OpenSSL level (see http://www.openssl.org/docs/ssl/SSL_write.html) by allowing people to use the SSL_MODE_ENABLE_PARTIAL_WRITE option. However, doing so by default could break existing code which assumes that writes either fail or succeed completely.

issue8240 talks about a slightly related request.
History
Date User Action Args
2011-06-10 17:11:12pitrousetrecipients: + pitrou, giampaolo.rodola, dsiroky
2011-06-10 17:11:12pitrousetmessageid: <1307725872.77.0.389106860281.issue12197@psf.upfronthosting.co.za>
2011-06-10 17:11:12pitroulinkissue12197 messages
2011-06-10 17:11:11pitroucreate