New submission from Ivan Konovalov <ivk...@gmail.com>:
Normally, when I upload files using the PUT request I get upload speed of about 100 Mb/s. But as soon as I set the timeout, the speed drops to about 4 Mb/s (can vary depending on the server): # Running on Windows 10, using Python 3.6.5 from io import BytesIO import http.client def upload(timeout=None): test_file = BytesIO(b"0" * 15 * 1024**2) if timeout is not None: conn = http.client.HTTPConnection("httpbin.org", timeout=timeout) else: conn = http.client.HTTPConnection("httpbin.org") conn.request("PUT", "/put", body=test_file) conn.getresponse().read() upload(25) # Painfully slow upload() # Pretty fast This problem seems to only affect Windows. ---------- components: IO, Library (Lib), Windows messages: 319323 nosy: ivknv, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Very slow upload with http.client on Windows when setting timeout type: performance versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33838> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com