[7/15] Engines: Content-Length on Netty, shared cross-engine HTTP conformance suite - #160
Open
UnknownJoe796 wants to merge 2 commits into
Open
[7/15] Engines: Content-Length on Netty, shared cross-engine HTTP conformance suite#160UnknownJoe796 wants to merge 2 commits into
UnknownJoe796 wants to merge 2 commits into
Conversation
Contributor
Author
|
Looks great. |
UnknownJoe796
force-pushed
the
v53/settings-thread-safety
branch
from
July 29, 2026 22:54
b2759a2 to
ed1d009
Compare
UnknownJoe796
force-pushed
the
v53/engine-conformance
branch
from
July 29, 2026 22:54
ba49340 to
af9221d
Compare
toNettyResponse omitted Content-Length for bodyless responses (307 redirects, etc.). Without a Content-Length, a keep-alive HTTP/1.1 client cannot tell the response is complete and stalls until the idle timeout closes the connection. Always emit the length (0 when empty). Ktor and JDK already did this; Netty was the outlier. Surfaced by the new cross-engine conformance suite: the trailing-slash 307 redirect test took 120s on Netty (idle timeout) versus <1s on the other engines. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 1f76395) (cherry picked from commit b05e864)
The Ktor, Netty, and JDK engines each hand-roll request/response translation with no shared test asserting they behave identically against the expectations.md contract. Add one reusable suite in engine-local test fixtures (EngineHttpConformanceSuite) that each engine runs via a ~30-line subclass supplying only how to start itself; the shared HTTP client is the JDK's java.net.http.HttpClient so no new test deps are needed. Checks (all pass on all three engines): nosniff on success and error responses, HEAD fallback, trailing-slash 307 with Location, CORS origin reflection, OPTIONS preflight, HSTS absent over http, timeout 408, and oversized-body 413 (first 413 coverage for Netty). Known gaps are asserted honestly rather than faked: expectations.md's static OPTIONS headers (Allow/Accept-Post/Accept-Patch/Accept-Ranges) and Range/Accept-Ranges are not implemented at the engine level and are documented in the suite as unmet expectations, not passing assertions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 0a4811b) (cherry picked from commit af9221d)
UnknownJoe796
force-pushed
the
v53/settings-thread-safety
branch
from
July 30, 2026 02:19
ed1d009 to
4067167
Compare
UnknownJoe796
force-pushed
the
v53/engine-conformance
branch
from
July 30, 2026 02:19
af9221d to
d8cf104
Compare
UnknownJoe796
changed the base branch from
v53/settings-thread-safety
to
v53/security-headers
July 30, 2026 02:24
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.
Content-Length; without it some clients hangwaiting for more body.
engine-localtest fixtures,run by the Ktor, Netty and JDK engines, so behavioural drift between engines
surfaces as a test failure rather than in production. It covers the Netty bug
above.