method enum Registered method token. GET/HEAD use 304 for not-modified, representation-changing methods use 412, and CONNECT/OPTIONS/TRACE/PRI ignore every precondition.
Evaluate RFC 9110 conditional requests in the required precedence order, including strong/weak ETags, wildcard resources, 304 and 412 decisions.
Authoritative reference data or standards computation
| Parameter | Type | Default & allowed | Description |
|---|---|---|---|
method | enum | default: GET allowed: ACL | BASELINE-CONTROL | BIND | CHECKIN | CHECKOUT | CONNECT | COPY | DELETE | GET | HEAD | LABEL | LINK | LOCK | MERGE | MKACTIVITY | MKCALENDAR | MKCOL | MKREDIRECTREF | MKWORKSPACE | MOVE | OPTIONS | ORDERPATCH | PATCH | POST | PRI | PROPFIND | PROPPATCH | PUT | QUERY | REBIND | REPORT | SEARCH | TRACE | UNBIND | UNCHECKOUT | UNLINK | UNLOCK | UPDATE | UPDATEREDIRECTREF | VERSION-CONTROL example: PUT | Registered method token. GET/HEAD use 304 for not-modified, representation-changing methods use 412, and CONNECT/OPTIONS/TRACE/PRI ignore every precondition. |
exists | boolean | default: true example: true | Whether a current selected representation exists; controls wildcard entity-tag conditions. |
etag | string | allowed: ≤ 512 example: "revision-7" | Current representation ETag, including quotes and optional W/ prefix. |
lastModified | string | allowed: ≤ 64 example: Sun, 06 Nov 1994 08:49:37 GMT | Current Last-Modified value in canonical IMF-fixdate form. |
ifMatch | string | allowed: ≤ 2048 example: "revision-7" | If-Match field value: * or a bounded comma-separated entity-tag list. |
ifNoneMatch | string | allowed: ≤ 2048 example: W/"preview", "revision-7" | If-None-Match field value: * or a bounded comma-separated entity-tag list. |
ifModifiedSince | string | allowed: ≤ 64 example: Sun, 06 Nov 1994 08:49:37 GMT | If-Modified-Since in any RFC 9110 HTTP-date form. Invalid values are ignored, matching HTTP behavior. |
ifUnmodifiedSince | string | allowed: ≤ 64 example: Sun, 06 Nov 1994 08:49:37 GMT | If-Unmodified-Since in any RFC 9110 HTTP-date form. Ignored when If-Match is present. |
method enum Registered method token. GET/HEAD use 304 for not-modified, representation-changing methods use 412, and CONNECT/OPTIONS/TRACE/PRI ignore every precondition.
exists boolean Whether a current selected representation exists; controls wildcard entity-tag conditions.
etag string Current representation ETag, including quotes and optional W/ prefix.
lastModified string Current Last-Modified value in canonical IMF-fixdate form.
ifMatch string If-Match field value: * or a bounded comma-separated entity-tag list.
ifNoneMatch string If-None-Match field value: * or a bounded comma-separated entity-tag list.
ifModifiedSince string If-Modified-Since in any RFC 9110 HTTP-date form. Invalid values are ignored, matching HTTP behavior.
ifUnmodifiedSince string If-Unmodified-Since in any RFC 9110 HTTP-date form. Ignored when If-Match is present.
| Parameter | Type | Default & allowed | Description |
|---|---|---|---|
fields | list | example: method,exists | Return only these fields (comma-separated). Mutually exclusive with 'exclude'. |
exclude | list | example: evaluations | Return all fields except these (comma-separated). |
pretty | boolean | default: false example: true | Pretty-print the JSON response. |
unwrap | boolean | default: false example: true | Drop the envelope: return the raw array/object without data/meta wrapper. |
fields list Return only these fields (comma-separated). Mutually exclusive with 'exclude'.
exclude list Return all fields except these (comma-separated).
pretty boolean Pretty-print the JSON response.
unwrap boolean Drop the envelope: return the raw array/object without data/meta wrapper.
| Field | Type | Description | Example |
|---|---|---|---|
method | string | Canonical request method used for status selection. | PUT |
exists | boolean | Whether the modeled selected representation exists. | true |
currentEtag nullable | string | Current entity-tag or null when unavailable. | "revision-7" |
lastModified nullable | string (HTTP-date) | Canonical Last-Modified value or null. | Sun, 06 Nov 1994 08:49:37 GMT |
decision | string | proceed, notModified or preconditionFailed. | proceed |
status nullable | integer | 304/412 when a precondition determines a response; otherwise null. | null |
controllingCondition nullable | string | Condition that determined 304/412, or null when processing proceeds. | null |
evaluations | object[] | Ordered condition results with true, false, ignored or skipped explanations. | [{"condition":"If-Match","result":"true","detail":"The current representation strongly matches the condition."}] |
method string Canonical request method used for status selection.
example: PUT
exists boolean Whether the modeled selected representation exists.
example: true
currentEtag string nullable Current entity-tag or null when unavailable.
example: "revision-7"
lastModified string (HTTP-date) nullable Canonical Last-Modified value or null.
example: Sun, 06 Nov 1994 08:49:37 GMT
decision string proceed, notModified or preconditionFailed.
example: proceed
status integer nullable 304/412 when a precondition determines a response; otherwise null.
example: null
controllingCondition string nullable Condition that determined 304/412, or null when processing proceeds.
example: null
evaluations object[] Ordered condition results with true, false, ignored or skipped explanations.
example: [{"condition":"If-Match","result":"true","detail":"The current representation strongly matches the condition."}]
/api/http-preconditions/evaluate?method=PUT&etag=%22revision-7%22&ifMatch=%22revision-7%22 {
"data": {
"method": "PUT",
"exists": true,
"currentEtag": "\"revision-7\"",
"lastModified": null,
"decision": "proceed",
"status": null,
"controllingCondition": null,
"evaluations": [
{
"condition": "If-Match",
"result": "true",
"detail": "The current representation strongly matches the condition."
}
]
},
"meta": {
"endpoint": "http-preconditions",
"route": "/evaluate",
"params": {
"method": "PUT",
"exists": true,
"etag": "\"revision-7\"",
"ifMatch": "\"revision-7\""
},
"generatedAt": "2026-07-29T08:13:22.000Z"
}
} /api/http-preconditions/evaluate?method=GET&etag=%22revision-7%22&ifNoneMatch=W%2F%22revision-7%22 {
"data": {
"method": "GET",
"exists": true,
"currentEtag": "\"revision-7\"",
"lastModified": null,
"decision": "notModified",
"status": 304,
"controllingCondition": "If-None-Match",
"evaluations": [
{
"condition": "If-None-Match",
"result": "false",
"detail": "A current representation weakly matches the condition."
}
]
},
"meta": {
"endpoint": "http-preconditions",
"route": "/evaluate",
"params": {
"method": "GET",
"exists": true,
"etag": "\"revision-7\"",
"ifNoneMatch": "W/\"revision-7\""
},
"generatedAt": "2026-07-29T08:13:22.000Z"
}
} /api/http-preconditions/evaluate?method=PUT&exists=false&ifNoneMatch=* {
"data": {
"method": "PUT",
"exists": false,
"currentEtag": null,
"lastModified": null,
"decision": "proceed",
"status": null,
"controllingCondition": null,
"evaluations": [
{
"condition": "If-None-Match",
"result": "true",
"detail": "No current representation weakly matches the condition."
}
]
},
"meta": {
"endpoint": "http-preconditions",
"route": "/evaluate",
"params": {
"method": "PUT",
"exists": false,
"ifNoneMatch": "*"
},
"generatedAt": "2026-07-29T08:13:22.000Z"
}
} Evaluates the four HTTP request preconditions used for cache validation and optimistic concurrency: If-Match, If-Unmodified-Since, If-None-Match and If-Modified-Since.
The route follows RFC 9110 section 13.2.2 precedence. If-Match uses strong entity-tag comparison and suppresses If-Unmodified-Since; If-None-Match uses weak comparison and suppresses If-Modified-Since. A matching If-None-Match produces 304 for GET/HEAD but 412 for methods that select or modify a representation. RFC 9110 requires methods such as CONNECT, OPTIONS and TRACE to ignore all preconditions; the HTTP/2 connection-preface sentinel PRI is ignored too. The * form tests whether a selected representation exists, so If-None-Match: * is useful for create-only writes.
The output is an explanation, not an HTTP response: decision, status, controllingCondition and an ordered evaluation trace show exactly why the result was reached. Conditional dates accept all three RFC 9110 HTTP-date forms (IMF-fixdate, obsolete RFC 850 and asctime), while invalid values are ignored as HTTP requires. The modeled current Last-Modified value remains canonical IMF-fixdate. Malformed entity-tag syntax is a 400.
This calculator deliberately does not model the optional “change already succeeded” exception, authorization, method semantics or representation selection. It assumes normal request checks have already completed and evaluates only the supplied current representation state and precondition fields.
Strong comparison. A weak tag such as W/"v1" never satisfies If-Match, even when its opaque value equals the current tag.
A matching If-None-Match returns 304 for GET or HEAD and 412 for representation-changing methods such as PUT, PATCH or DELETE. CONNECT, OPTIONS, TRACE and the PRI connection preface ignore preconditions.
If-Match suppresses If-Unmodified-Since, and If-None-Match suppresses If-Modified-Since, matching RFC 9110's required evaluation order.
Complete pinned IANA HTTP field-name registry with status, Structured Field type, references, search and case-insensitive lookup.
The complete current IANA HTTP Method Registry with safe and idempotent flags — filter the list or look up one canonical method token.
The complete IANA HTTP status code registry with practical descriptions, defining RFCs and a retryable flag — list by category or look up a single code.
Parse and resolve bounded RFC 9110 byte Range sets, plus validate satisfied, unknown-length and unsatisfied Content-Range field values.
Parse RFC 9110 Accept media ranges and deterministically select the best available representation using specificity, parameters and q weights.
Compute RFC 9111 cache behavior from your headers: storability, freshness lifetime, current age, fresh/stale verdict and the stale-while-revalidate window.