[3.12] gh-112064: Fix incorrect handling of negative read sizes in `HTTPResponse.read()` (GH-128270) (#129396)
gh-112064: Fix incorrect handling of negative read sizes in `HTTPResponse.read()` (GH-128270) The parameter `amt` of `HTTPResponse.read()`, which could be a negative integer, has not been handled before and led to waiting for the connection to close for `keep-alive connections`. Now, this has been fixed, and passing negative values to `HTTPResponse().read()` works the same as passing `None` value. (cherry picked from commit 4d0d24f6e3dff2864007c3cfd1cf7d49c6ee5317) Co-authored-by: Yury Manushkin <manushkin@gmail.com>
M
Miss Islington (bot) committed
e5ab9e37408e2470040407deeb87f618c5f053ee
Parent: ea143e6
Committed by GitHub <noreply@github.com>
on 1/28/2025, 11:54:27 AM