Achieve RFC 9112 HTTP/1.1 Message Framing
Created November 6, 2026 · Updated November 6, 2026 · Achieve 3.1.0 · Qualified runtime: Node.js 24.22.2
Requirement levels: HTTP/1.1 framing contains mandatory MUST and MUST NOT rules, error-handling requirements, and a SHOULD response for unrecognized transfer codings.
Achieve uses Node.js's HTTP/1.1 server and llhttp parser. Those components recognize the wire message, determine its body framing, decode chunked transfer coding, and expose an accepted request stream. Achieve then applies request handling and servlet input policy.
Applicable requirements
- MUST: Under RFC 9112 §5.2, field lines are parsed without whitespace between the field name and colon; obsolete line folding received outside
message/httpmust be rejected or replaced as specified. - MUST / MUST NOT: §6 defines the precedence for message-body length and prohibits treating ambiguous or invalid Content-Length and Transfer-Encoding combinations as ordinary framing.
- SHOULD: Under §6.1, a server receiving an unrecognized request transfer coding should respond with 501. The qualified runtime does not satisfy this for an unknown coding followed by final chunked, as noted below.
- MUST: Under §6.3, a request whose final transfer coding is not chunked is rejected with 400 and the connection is closed.
- MUST: Under §7.1, a recipient must parse and decode chunked transfer coding and account for its terminating chunk and trailer section.
- MUST: Under §8, an incomplete request message caused by premature closure is not treated as complete.
Determining message length
RFC 9112 §6 defines the precedence of response status, method, Transfer-Encoding, Content-Length, and connection closure when determining message length. Conflicting or invalid framing must not be treated as an ordinary request. Node's parser performs these checks before Achieve receives the request.
For accepted requests, Node exposes decoded request content. Achieve buffers and parses supported GET and POST input only within its configured limit; otherwise application code can consume the stream. For responses, Achieve selects content and relevant fields while Node produces the HTTP/1.1 framing.
Chunked coding and trailers
RFC 9112 §7.1 defines chunked transfer coding. Node removes chunk framing before the body reaches Achieve. Trailer fields remain distinct from the ordinary header section and are exposed through Node's request API. Premature closure of a request body is not treated as successful completion.
Persistent connection reuse depends on an unambiguous message boundary. Raw-wire tests verify that valid controls can carry a subsequent request and that malformed framing is rejected or the connection is closed rather than reinterpreted as another request.
Responsibility boundary
Node.js and llhttp own request-line and field parsing, Transfer-Encoding and Content-Length conflict detection, chunk syntax, and low-level connection errors. Achieve owns its buffering limit, parameter parsing, application dispatch, and generated response decisions. Because the complete Achieve endpoint includes the runtime parser, runtime behavior remains part of the conformance assessment even when Achieve cannot intercept it.
Known limitation
RFC 9112 §6.1 says a server that receives an unrecognized request transfer coding SHOULD respond with 501. In the qualified endpoint, a request using an unknown coding followed by final chunked is accepted by Node, chunk framing is removed, and the undecoded representation reaches the application. The same behavior occurs in standalone Node. No documented justification for departing from the recommendation has been established, so this remains a runtime-owned SHOULD-level nonconformance.
Automated and wire verification
Existing input, response-completion, request-method, and HTTP/1.1 tests cover accepted streams and response framing. Focused raw-TCP investigations add positive and negative controls for duplicate or conflicting lengths, transfer-coding order, chunk syntax, trailers, incomplete bodies, connection reuse, and TLS closure. These observations are bounded to the tested Node.js 24.22.2 endpoint; they do not prove every possible byte sequence.
See Achieve HTTP conformance testing and the assessment evidence index.
