Achieve RFC 9110 HTTP Methods and Responses
Created November 6, 2026 · Updated November 6, 2026 · Achieve 3.1.0 · Qualified runtime: Node.js 24.22.2
Requirement levels: The applicable rules include MUST, MUST NOT, SHOULD, and MAY requirements; each is identified with its context below.
Achieve supplies built-in handling for GET, HEAD, POST, and OPTIONS and can dispatch additional registered methods to JavaScript Servlets. Method semantics matter because they determine whether content is sent, how response metadata is calculated, and who completes the exchange.
Applicable requirements
- MUST: Under RFC 9110 §9.1, a general-purpose origin server must support GET and HEAD.
- MUST NOT / SHOULD: Under §9.3.2, a server must not send content for HEAD and should send the same fields as GET except those determined only while generating content.
- MUST: Under §6.2, a server must send a final response after interpreting a request unless connection closure or an error prevents completion.
- MUST NOT: §8.6 restricts Content-Length on HEAD and 304 and prohibits it on 1xx, 204, and successful 2xx CONNECT responses.
- MUST NOT: Under §15.3.6, a server must not generate content in a 205 response.
- MUST: Under §15.5.6, an origin server generating 405 must generate an
Allowfield listing currently supported methods. The qualified Node runtime does not satisfy this for its HTTP/2 CONNECT rejection, as noted below.
Method handling
GET follows normal resource routing. HEAD performs the corresponding GET selection and processing but sends no response content. Achieve still invokes a servlet for HEAD so that its status and headers describe the same operation; the managed completion path suppresses the returned content.
POST follows normal routing. Achieve parses supported form and JSON input for servlet use; other request content remains available as the Node.js request stream. OPTIONS is handled by Achieve and returns server or resource capabilities with an Allow field. Additional valid method tokens can be registered to one servlet handler per method. An unregistered method receives 501 Not Implemented.
Response completion and content rules
RFC 9110 §6.2 requires a server to send a final response after it receives and interprets a request unless the connection closes or an error prevents completion. Achieve completes ordinary returned servlet values and Promises, while session.autoEnd = false transfers normal completion responsibility to the application.
RFC 9110 §8.6 places strict conditions on Content-Length for HEAD, 304, informational responses, 204, and successful CONNECT. Achieve chooses whether content is permitted; Node.js serializes the selected HTTP version. For a HEAD response, any content length describes the corresponding GET representation rather than bytes sent on the wire.
A servlet result of null or undefined changes the default 200 status to 204 No Content. An empty string remains content and retains the selected status. For 205 Reset Content, the server MUST NOT generate content. Achieve therefore substitutes empty content at the servlet response boundary, removes transfer coding, and selects a zero content length while preserving Node's native validation and response lifecycle behavior.
Application and runtime responsibility
Achieve owns servlet invocation, method dispatch, managed completion, and its generated response fields. Node.js owns HTTP/1.1 and HTTP/2 serialization and several protocol-level rejection paths. Application code remains responsible for the semantics of status codes and fields it deliberately selects, except where Achieve enforces a protocol rule on its supported response API.
A qualified-runtime limitation remains for classic CONNECT over HTTP/2: Node's compatibility layer can generate 405 Method Not Allowed without the Allow field that RFC 9110 §15.5.6 says an origin server MUST generate. The request does not reach Achieve's compatibility request handler, so the assessed endpoint records this as a runtime-owned nonconformance.
Automated verification
The response-completion, request-method, registered-method, input, CONNECT, CORS, and static-resource verifiers exercise normal and error completion. Focused tests cover GET/HEAD correspondence, Promise settlement, application-owned completion, empty results, 204 and 205 content suppression, native write validation, callbacks, and connection reuse over HTTP, HTTPS, h2c, and secure HTTP/2.
See Achieve HTTP conformance testing for the stable test-suite entry point.
Limits
Achieve does not implement successful CONNECT tunneling. Registered methods are global method handlers rather than URL-specific routes, and their request bodies are not automatically parsed. Direct manipulation below the supported Node response API is outside Achieve's managed completion contract.
