Skip to content

Conversation

@karthik-phl
Copy link
Contributor

@karthik-phl karthik-phl requested a review from a team as a code owner January 28, 2026 19:58
Comment on lines 495 to 499
// Libraries like `Reqwest` generate a 0-length frame after sensing end-of-stream,
// so we have to check for the body's end-of-stream indicator here too
if self.body.is_end_stream() {
break 'result Ok(None);
}
Copy link
Member

Choose a reason for hiding this comment

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

This looks like it should also be checking the size of the frame received because if it's a nonzero-sized-frame but the body has ended it seems like we'd still want to yield/copy that frame and then only on the next poll sever the stream when is_end_stream is true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair point. I have updated the check and added an extra test. Thanks.

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Thanks!

@alexcrichton alexcrichton added this pull request to the merge queue Jan 30, 2026
Merged via the queue into bytecodealliance:main with commit 933c601 Jan 30, 2026
45 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.

wasi-http not handling 0-length response frames

2 participants