Skip to content

fix(http2): fail a request body ended by NO_ERROR - #4287

Closed
kaygaaf wants to merge 1 commit into
hyperium:masterfrom
kaygaaf:fix/h2-request-no-error-reset
Closed

kaygaaf wants to merge 1 commit into
hyperium:masterfrom
kaygaaf:fix/h2-request-no-error-reset

Conversation

@kaygaaf

@kaygaaf kaygaaf commented Nov 27, 2026

Copy link
Copy Markdown

A client that sends 3 bytes of a 10-byte POST and then RST_STREAM(NO_ERROR) made collect() return Ok. The handler then treats a short upload as the whole body.

That reset is how a server stops an upload after it has already answered (RFC 9113 section 8.1). Response bodies still end on NO_ERROR. A request body that still owes bytes returns the reset error, the same way CANCEL already does.

The new test failed first: collect() returned Ok. cargo test --test server --features full h2_request_ now passes, including a full 10-byte upload. http2_responds_before_consuming_request_body still passes.

Fixes #4286

RST_STREAM(NO_ERROR) is how a server stops an upload after an early
response. That should end a response body, not a request body that
still owes bytes. collect() now returns the reset error.

Fixes hyperium#4286
@kaygaaf

kaygaaf commented Nov 27, 2026

Copy link
Copy Markdown
Author

Closing this. The template check wants the human-authorship line, and I will not add that.

@kaygaaf kaygaaf closed this Nov 27, 2026
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.

HTTP/2 server: client RST_STREAM(NO_ERROR) mid-body still ends the request body cleanly

1 participant