Message138116
| 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: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 |
|