Repository navigation
Add a wire-level test of the Expect: 100-continue handshake (#363) - #1692
Merged
Merged
Conversation
The HTTP server connector (Jetty) answers "Expect: 100-continue" with an interim "100 Continue" response before the client sends the body. Nothing pinned this behavior; the new test checks it with a raw socket: the interim response comes before the body, a client that sends the body immediately is still served, and no interim response is sent without the Expect header. Test only, no production code change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Use a text block for the request head (S6126), converted to CRLF line endings. No behavior change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Related to #363 (does not close it: the issue is closed separately with a comment).
Why
Expect: 100-continuewas reported in #363 as unhandled. Measured with raw sockets against a live server, the HTTP server connector already answers it correctly in 3.0 (Netty,NettyServerHandler) and in 2.7 (Jetty): the server sends the interim100 Continueresponse before the client sends the body. Nothing pinned this behavior, so a connector or Jetty/Netty upgrade could silently break it.Change
Test only, no production code and no
changes.mdentry:ExpectContinueTestCase(3 tests, rawSocket, no sleeps, 10 s read timeouts as an upper bound):Expect: 100-continuewith the headers only getsHTTP/1.1 100 Continuebefore the body is sent, then the final200;Expect, no100 Continueis sent.The unknown-expectation behavior (2.7 answers 417, 3.0 ignores it) is deliberately not asserted: RFC 9110 only says MAY.
Verification
verifyof the core module passes. On 3.0, disabling theis100ContinueExpectedbranch ofNettyServerHandlermakes test 1 fail (read timeout) while tests 2 and 3 stay green; the file was restored afterwards.Same fix on the other maintained versions: 3.0 #1691.
🤖 Generated with Claude Code