Skip to content

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

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

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

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.

Note: on the machine used, the core test ProxyTestCase.bypassesProxyForLoopbackHostsByDefault fails without this change (excluded from the run); unrelated.

Same fix on the other maintained versions: 2.7 #1692.

🤖 Generated with Claude Code

The HTTP server connector 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 44a3425 into 3.0 Nov 23, 2026
3 checks passed
@thboileau-git
thboileau-git deleted the feature/363-expect-continue-test 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