Skip to content

Add a wire-level test of the Expect: 100-continue handshake (#363) - #1692

Merged
thboileau-git merged 2 commits into
2.7from
feature/363-expect-continue-test-2.7
Nov 23, 2026
Merged

thboileau-git merged 2 commits into
2.7from
feature/363-expect-continue-test-2.7

Conversation

@thboileau-git

@thboileau-git thboileau-git commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Related to #363 (does not close it: the issue is closed separately with a comment).

Why

Expect: 100-continue was 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 interim 100 Continue response 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.md entry: ExpectContinueTestCase (3 tests, raw Socket, no sleeps, 10 s read timeouts as an upper bound):

  1. Expect: 100-continue with the headers only gets HTTP/1.1 100 Continue before the body is sent, then the final 200;
  2. a client that sends the body right after the headers is still served (the interim response is optional there);
  3. without Expect, no 100 Continue is sent.
    The unknown-expectation behavior (2.7 answers 417, 3.0 ignores it) is deliberately not asserted: RFC 9110 only says MAY.

Verification

verify of the core module passes. On 3.0, disabling the is100ContinueExpected branch of NettyServerHandler makes 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

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>
@sonarqubecloud

Copy link
Copy Markdown

@thboileau-git
thboileau-git merged commit 69d1544 into 2.7 Nov 23, 2026
6 checks passed
@thboileau-git
thboileau-git deleted the feature/363-expect-continue-test-2.7 branch November 23, 2026 16:54
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