Achieve — High Level Logic Project. Creating a new meta design pattern.

Friendly in development. Fast in production. Just build your apps. Let Achieve do the rest.

← Back to technical specifications

Achieve RFC 9110 Content-Length

Created November 6, 2026 · Updated November 6, 2026 · Achieve 3.1.0 · Qualified runtime: Node.js 24.22.2

Requirement levels: Content-Length includes status- and method-specific MUST NOT rules plus message-framing requirements.

Achieve derives static and media lengths from the selected opened representation. Node serializes dynamic responses and enforces the protocol-specific response framing used by HTTP/1.1 and HTTP/2.

Applicable requirements

Static and media representations

Identity, gzip, and deflate static responses use the exact selected file size. Media 200 responses use the complete size; a 206 uses the selected range length and Content-Range. HEAD selects the same representation as GET and sends no body while retaining the corresponding full length.

Status-specific behavior

Achieve's 204 and 304 paths do not send content. The 205 completion boundary suppresses attempted content, removes Transfer-Encoding, and normalizes Content-Length to zero while preserving native response lifecycle behavior. Conditional failures and errors do not retain a stale static-resource length.

Servlet responses

For supported returned strings and byte buffers, Node can compute or serialize the resulting length. Applications that take response ownership can set Content-Length themselves and are responsible for matching their bytes; Achieve preserves native Node validation rather than silently correcting arbitrary application metadata.

Verification

Static-length and response-completion suites compare headers with exact bytes across identity and compressed representations, HEAD, 304, 412, 204, 205, errors, media ranges, and all four transports. HTTP/1.1 framing and malformed request-length probes verify parser behavior separately.