Skip to content

Answer Expect: 100-continue on HTTP/1.1 - #958

Closed
MDA2AV wants to merge 2 commits into
mainfrom
expect-100-continue
Closed

MDA2AV wants to merge 2 commits into
mainfrom
expect-100-continue

Conversation

@MDA2AV

@MDA2AV MDA2AV commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Split out of #953, which stays about the ioxide update.

A request that carries Expect: 100-continue never got a 100 Continue back on the internal or the ioxide engine, so the client waited out its own timeout before sending the body anyway - a second for curl, which adds the header to every HTTP/1.1 upload over 1 MB (#928).

  • The internal and the ioxide engine answer Expect: 100-continue on HTTP/1.1 with 100 Continue as the handler first reads the body, the way Kestrel does - a handler that answers without reading (a 401, a 413) never invites the upload. The body reads through a ContinueReader over the connection's reader, which writes the 100 on its first read and is disarmed once the final response starts, since no interim response may follow a final one.
  • When the 100 was never sent, the final response is flushed before the body is drained, since the client holds the body back until it hears something.
  • Any other expectation on a request with a body is answered with 417 Expectation Failed, in the shared compliance concern, so on every engine. The header is ignored on HTTP/1.0, and on a request without a body, which has nothing to wait for.
  • The second commit is the one made on Update ioxide to 0.27.637, serialize websocket writes by default, and refuse them once the handler has ended #953 in review: the compliance concern reads those headers only once the request is known to have a body.

Verification

  • The solution builds clean. Acceptance suite on top of main, net11.0: 2,618 passed, 0 failed, 4 skipped; net10.0: 2,615 passed, 0 failed, 4 skipped.
  • 6 new tests in ExpectContinueTests, 18 cases across the three engines. The 100-continue cases were run with the fix disabled and fail without it; the 417 and HTTP/1.0 cases are controls. Kestrel answers 100-continue itself, so those cases pass there either way.

Closes #928

MDA2AV and others added 2 commits October 26, 2026 17:27
The internal and the ioxide engine send the 100 (Continue) as the handler
first reads the body, the way Kestrel does, so a handler that answers without
reading never invites the upload. An unknown expectation is answered with
417, and the header is ignored on HTTP/1.0 (#928).
MDA2AV added a commit that referenced this pull request Oct 26, 2026
The 100 (Continue) handling and the 417 for other expectations move to #958,
together with the compliance concern change made on top of them, so this
branch stays about the ioxide update; these files are back to main.
@Kaliumhexacyanoferrat

Copy link
Copy Markdown
Owner

Implemented via #965

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/1.1: Expect: 100-continue is never answered, so clients wait a second before sending the body

2 participants