Skip to content

Close bodyless h2c request streams - #196

Open
OskarEichler wants to merge 1 commit into
igrigorik:mainfrom
OskarEichler:audit/fix-bodyless-h2c-end-stream
Open

Close bodyless h2c request streams#196
OskarEichler wants to merge 1 commit into
igrigorik:mainfrom
OskarEichler:audit/fix-bodyless-h2c-end-stream

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

  • set END_STREAM on the synthesized request HEADERS for a bodyless h2c upgrade
  • preserve END_HEADERS, which is already present on the frame
  • leave request bodies on the existing DATA + END_STREAM path

Reproduction

Server#upgrade initializes the frame with END_HEADERS, then ORs END_HEADERS a second time when the HTTP/1.1 request body is empty. Stream 1 remains open, although RFC 9113's h2c upgrade semantics require the completed HTTP/1.1 request to be half-closed from the client toward the server.

Verification

  • 448 examples, 0 failures on Ruby 4.0.6
  • focused bodyless upgrade finishes in half_closed_remote
  • body-bearing upgrade behavior remains covered by the existing suite
  • syntax and RuboCop pass

No repository tests were changed. I used an AI coding assistant during investigation and verification.

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.

1 participant