Wiktor Niesiobedzki added the comment:
Here are the test cases that I've come up with.
test_response_after_headers - tests for the case that I'm missing
test_ssl_renegotiation - tests for the case that Martin point out
As in stock ssl library there is no way to force renegotiation,
Wiktor Niesiobedzki added the comment:
I've checked how it behaves, when I do:
$ openssl s_client -host api.onedrive.com -port 443
The server then works like that (using curl debug log style):
> PUT /v1.0/drives/me/root:/test.file:/content HTTP/1.1
> Host: api.onedrive.com
>
Wiktor Niesiobedzki added the comment:
Here is revised patch. Also covers changes to tests.
--
Added file: http://bugs.python.org/file41392/http.client.put.fix.patch
___
Python tracker
<http://bugs.python.org/issue25
Wiktor Niesiobedzki added the comment:
Maybe something like this? Doesn't look too complicated and I haven't noticed
any breakage yet.
--
keywords: +patch
Added file: http://bugs.python.org/file41390/http.client.put.fix.patch
___
Pyth
New submission from Wiktor Niesiobedzki:
It looks like, when doing PUT together with a file-like object to send,
http.client will try to send the whole file before analysing the response from
the server.
If you do the following:
$ dd if=/dev/zero of=/tmp/300mb.zero bs=1M count=300
And then