fix(http): a handler-set ETag array is still the handler's (CARD-15) #151

Merged
chrnx merged 1 commits from fix/etag-array-header into develop 2026-10-24 19:08:28 +00:00
Owner

With etag: true, tagged() only recognised a handler ETag given as a
string. Given as an array, it compared If-None-Match against the body's
computed tag while sending the handler's array, so a client revalidating
with the tag it was sent got a 200 instead of a 304, and two ETag values
went on the wire.

ETag is single-valued, so the last value of an array wins, as a repeated
setHeader would. It is sent alone and drives the comparison.

Found in the pre-freeze integrated review.

With `etag: true`, `tagged()` only recognised a handler ETag given as a string. Given as an array, it compared If-None-Match against the body's computed tag while sending the handler's array, so a client revalidating with the tag it was sent got a 200 instead of a 304, and two ETag values went on the wire. ETag is single-valued, so the last value of an array wins, as a repeated `setHeader` would. It is sent alone and drives the comparison. Found in the pre-freeze integrated review.
chrnx added 1 commit 2026-10-24 18:55:11 +00:00
fix(http): a handler-set ETag array is still the handler's (CARD-15)
CI / dco (pull_request) Successful in 4s
CI / runtimes (bun) (pull_request) Successful in 20s
CI / build (pull_request) Successful in 30s
CI / runtimes (edge) (pull_request) Successful in 19s
CI / runtimes (deno) (pull_request) Successful in 33s
3efe049bb5
With `etag: true`, `tagged()` only recognised a handler ETag given as a
string. Given as an array, it compared If-None-Match against the body's
computed tag while sending the handler's array, so a client revalidating
with the tag it was sent got a 200 instead of a 304, and two ETag values
went on the wire.

ETag is single-valued, so the last value of an array wins, as a repeated
`setHeader` would. It is sent alone and drives the comparison.

Found in the pre-freeze integrated review.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
chrnx merged commit bb3d759f3a into develop 2026-10-24 19:08:28 +00:00
Sign in to join this conversation.