Achieve RFC 9110 §13 Conditional Requests
Created November 4, 2026 · Updated November 6, 2026 · Achieve 3.1.0 · Qualified runtime: Node.js 24.22.2
Requirement Level: Multiple — applicable MUST, SHOULD, and MAY requirements are identified below.
Achieve 3.1.0 is a Node.js HTTP application server that evaluates conditional request fields against the selected representation before serving its content or invoking the requested application action. Entity tags are representation-specific; their generation and design are described separately in Achieve RFC 9110 §8.8.3 ETag.
Applicable requirements
- MUST: An origin server evaluates
If-Match,If-None-Match, and applicableIf-Unmodified-Sinceconditions before performing the method. - MUST: A false
If-None-Matchcondition produces304 Not Modifiedfor GET or HEAD and412 Precondition Failedfor other methods. - MUST:
If-Unmodified-Sinceis ignored whenIf-Matchis present, andIf-Modified-Sinceis ignored whenIf-None-Matchis present. - SHOULD: An applicable
If-Modified-Sincecondition is evaluated for GET and HEAD; a false condition normally produces304 Not Modified. - MAY: RFC 9110 allows an origin server evaluating failed
If-MatchorIf-Unmodified-Sinceto use412, or in a narrowly defined already-succeeded case to return a successful status. Achieve consistently uses412for those failed conditions.
Evaluation order
Achieve follows the order required by RFC 9110 §13.2.2:
- Evaluate
If-Matchwhen present. A failure ends processing with412. - Otherwise, evaluate
If-Unmodified-Sincewhen a valid modification date is available. A failure ends processing with412. - Evaluate
If-None-Matchwhen present. A match produces304for GET or HEAD and412for other methods. - Otherwise, for GET or HEAD, evaluate
If-Modified-Sincewhen a valid modification date is available. If the representation has not been modified since the supplied date, return304.
This ordering gives entity tags precedence over date validators and evaluates lost-update protection before cache validation.
Validator comparison and fields
If-Match uses strong entity-tag comparison. A weak candidate cannot satisfy it. If-None-Match uses weak comparison, so matching opaque tags compare equal regardless of a weakness indicator. Both fields accept lists of entity tags and the * wildcard defined by their RFC sections.
Achieve accepts the three HTTP-date forms recognized by RFC 9110 and ignores invalid date values and date lists. If-Modified-Since applies only to GET and HEAD. If-Unmodified-Since can apply to other methods when modification metadata is available. Date comparison uses whole-second HTTP-date resolution.
Response behavior
A 304 Not Modified response has no representation body. Achieve returns the selected ETag and, when caching is enabled, the applicable Last-Modified value. Representation-selection metadata such as Vary: Accept-Encoding remains available where applicable.
A failed precondition returned as 412 Precondition Failed is completed without serving the selected representation or invoking the protected servlet action.
Automated verification
The verifier suite covers strong If-Match comparison, weak If-None-Match comparison, lists and wildcards, representation-specific tags, GET and HEAD 304, non-GET 412, and prevention of servlet execution after a failed precondition.
Date-focused checks cover valid and invalid HTTP-date forms, whole-second comparison, future-date handling, GET/HEAD applicability, ETag-over-date precedence, the complete precondition order, and expected validator metadata on conditional responses. HTTP, HTTPS, h2c, and secure HTTP/2 paths are exercised where relevant.
See Achieve HTTP conformance testing for the stable test-suite entry point and execution guidance.
Limitations
Achieve does not automatically generate entity tags for dynamic JavaScript Servlet output. Wildcard conditions can still test whether a servlet resource exists, but a specific entity tag cannot match unless the application supplies and manages that response behavior itself.
Date validators inherit HTTP-date's one-second resolution and depend on available filesystem modification metadata. Achieve's strong entity tags provide finer change discrimination for static and media representations; see the ETag specification for their metadata basis and limitations.