Skip to content

feat(http1): support expect: 100-continue on the client - #4182

Draft
bountis wants to merge 2 commits into
hyperium:masterfrom
bountis:feat/http1-client-expect-continue
Draft

feat(http1): support expect: 100-continue on the client#4182
bountis wants to merge 2 commits into
hyperium:masterfrom
bountis:feat/http1-client-expect-continue

Conversation

@bountis

@bountis bountis commented Sep 3, 2026

Copy link
Copy Markdown

Handle the Expect: 100-continue header fully.
https://www.rfc-editor.org/rfc/rfc9110.html#name-expect

This adds the missing handling logic of the header. The client didn't handle the header previously.

If there's the Expect: 100-continue header present the client only writes the head and parks the body.
If the server returns 100 Continue then go on and write the body.
If the server returns any non-1xx response the client drops the body and closes the connection.
Empty body ignores the header completely.

Also add a configurable timer to the client, client sends the body after the timeout, only if there's a timer setup, if not then it waits indefinitely.

Closes #3833

Comment thread src/proto/h1/conn.rs
Comment on lines +269 to +272
#[cfg(feature = "client")]
if seen_continue {
self.release_continue();
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Had to include this before the parse result match because otherwise the early return in the Pending arm would never flip the state and deadlock.

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.

Update Hyper Client to support handling expect: 100-continue header

1 participant