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 amacd31
Recipients amacd31, christian.heimes
Date 2021-01-07.08:03:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610006589.59.0.311109371799.issue42853@roundup.psfhosted.org>
In-reply-to
Content
When attempting to read a large file (> 2GB) over HTTPS the read fails with "OverflowError: signed integer is greater than maximum".

This occurs with Python >=3.8 and I've been able to reproduce the problem with the below snippet of code on Linux, Mac OS X, and Windows (the remote file can be any HTTPS hosted file larger than 2GB, e.g. an empty file generated with `dd if=/dev/zero of=2g.img bs=1 count=0 seek=2G` will also do the job.).

```
import http.client
connection = http.client.HTTPSConnection("mirror.aarnet.edu.au")
connection.request("GET", "/pub/centos/8/isos/x86_64/CentOS-8.3.2011-x86_64-dvd1.iso")
response = connection.getresponse()
data = response.read()
```

Doing a git bisect it looks like this is the result of a change in commit d6bf6f2d0c83f0c64ce86e7b9340278627798090 (https://github.com/python/cpython/commit/d6bf6f2d0c83f0c64ce86e7b9340278627798090). Looking over the associated issue and commit message it seems like this was not an intended outcome for the change.
History
Date User Action Args
2021-01-07 08:03:09amacd31setrecipients: + amacd31, christian.heimes
2021-01-07 08:03:09amacd31setmessageid: <1610006589.59.0.311109371799.issue42853@roundup.psfhosted.org>
2021-01-07 08:03:09amacd31linkissue42853 messages
2021-01-07 08:03:09amacd31create