Skip to content

fix(http09): resume partially written request lines - #2867

Open
aspire488 wants to merge 5 commits into
cloudflare:masterfrom
aspire488:fix/http09-resume-partial-request-writes
Open

aspire488 wants to merge 5 commits into
cloudflare:masterfrom
aspire488:fix/http09-resume-partial-request-writes

Conversation

@aspire488

Copy link
Copy Markdown

Fixes #2861.

Summary

The HTTP/0.9 client treated any successful stream_send call as a complete request. QUIC can accept only part of the request line when stream flow-control capacity is limited; in that case the client advanced to the next stream and never sent the remaining bytes or FIN.

This change:

  • tracks the number of request-line bytes accepted for each HTTP/0.9 request;
  • resumes the remainder on the same stream on the next send_requests call;
  • keeps the request at the front of the pending queue until all bytes and FIN are accepted;
  • advances the stream ID and sent-request count only after the request is complete;
  • retries Error::Done without losing the stream ID or byte offset.

Regression tests

Adds focused tests for:

  • multiple partial writes (8 + 21 + 1 bytes) on the same stream;
  • a blocked send after a partial write, followed by successful resumption from the saved offset.

Testing

Not run locally in this environment. The regression tests are added to the apps crate; CI should run formatting and Rust tests.

@aspire488
aspire488 requested a review from a team as a code owner November 4, 2026 11:30
Comment thread apps/src/common.rs
cardinal: i,
request_line,
stream_id: None,
sent_bytes: 0,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Linhvo1995

@ghedo ghedo added type: bugfix Corrects defective behavior. crate: quiche_apps Changes related to quiche_apps. labels Nov 11, 2026

Copy link
Copy Markdown
Author

Thanks for the review. The current head's CI checks are reporting action_required for the Semgrep, Nightly, and Stable workflows, so they have not executed. Could a maintainer approve the pending fork workflow runs so the regression tests can be validated?

Copy link
Copy Markdown
Author

The partial-write regression coverage is in the current head, including same-stream resumption and retry after Error::Done. The PR is mergeable and has no substantive unresolved inline feedback in the threads I can see. Could a maintainer review it when available?

Copy link
Copy Markdown
Author

The partial-write regression coverage is in the current head and GitHub reports the PR as mergeable. The Semgrep, Nightly, and Stable fork workflows remain action_required, so there is no fresh CI result. Could a maintainer approve the pending workflow runs so the tests can execute?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crate: quiche_apps Changes related to quiche_apps. type: bugfix Corrects defective behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

quiche-client: Http09Conn::send_requests drops the rest of a partially written request and its FIN

3 participants