Message138116
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. |
|
Date |
User |
Action |
Args |
2011-06-10 17:11:12 | pitrou | set | recipients:
+ pitrou, giampaolo.rodola, dsiroky |
2011-06-10 17:11:12 | pitrou | set | messageid: <1307725872.77.0.389106860281.issue12197@psf.upfronthosting.co.za> |
2011-06-10 17:11:12 | pitrou | link | issue12197 messages |
2011-06-10 17:11:11 | pitrou | create | |
|