mirror of
https://github.com/python/cpython.git
synced 2026-01-03 14:02:21 +00:00
[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 4d0d24f6e3)
Co-authored-by: Yury Manushkin <manushkin@gmail.com>
This commit is contained in:
parent
ea143e67b3
commit
e5ab9e3740
3 changed files with 24 additions and 1 deletions
|
|
@ -0,0 +1,2 @@
|
|||
Fix incorrect handling of negative read sizes in :meth:`HTTPResponse.read
|
||||
<http.client.HTTPResponse.read>`. Patch by Yury Manushkin.
|
||||
Loading…
Add table
Add a link
Reference in a new issue