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 ivknv
Recipients ivknv, paul.moore, steve.dower, tim.golden, zach.ware
Date 2018-06-11.17:49:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1528739398.2.0.592728768989.issue33838@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-06-11 17:49:58ivknvsetrecipients: + ivknv, paul.moore, tim.golden, zach.ware, steve.dower
2018-06-11 17:49:58ivknvsetmessageid: <1528739398.2.0.592728768989.issue33838@psf.upfronthosting.co.za>
2018-06-11 17:49:58ivknvlinkissue33838 messages
2018-06-11 17:49:58ivknvcreate