Skip to content

Avoid infinite loop in HTTPResponse.read_chunked when amt is zero#4974

Merged
illia-v merged 2 commits into
urllib3:mainfrom
Cycloctane:avoid-infinite-loop
Apr 29, 2026
Merged

Avoid infinite loop in HTTPResponse.read_chunked when amt is zero#4974
illia-v merged 2 commits into
urllib3:mainfrom
Cycloctane:avoid-infinite-loop

Conversation

@Cycloctane

Copy link
Copy Markdown
Contributor

#3797 didn't cover the HTTPResponse.read_chunked. read_chunked(0) still runs into infinite loop.

Fixes #3793

@illia-v illia-v left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, LGTM, thanks!

@illia-v illia-v merged commit e90af45 into urllib3:main Apr 29, 2026
39 checks passed
@Cycloctane Cycloctane deleted the avoid-infinite-loop branch April 29, 2026 23:56
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.

HTTPResponse.stream can fall into infinite loop when amt is zero

2 participants