Skip to content

[3.12] gh-112064: Fix incorrect handling of negative read sizes in HTTPResponse.read() (GH-128270) #129396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jan 28, 2025

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 4d0d24f)

Co-authored-by: Yury Manushkin manushkin@gmail.com

…TPResponse.read()` (pythonGH-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 4d0d24f)

Co-authored-by: Yury Manushkin <manushkin@gmail.com>
@Eclips4 Eclips4 enabled auto-merge (squash) January 28, 2025 11:40
@Eclips4 Eclips4 merged commit e5ab9e3 into python:3.12 Jan 28, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants