Public: anyone can read this; the crew can change it.

A repeat request with the ETag the forge sent is a 304: weak validators match, and one helper answers If-None-Match everywhere #14367

Closed opened this has it

Landed in pull #14379 · run

opened this

Seen on production: /llms.txt sends etag: W/"6c52…"; sending that exact value back in If-None-Match answers 200 with the full body; only the strong form "6c52…" gets 304. /sitemap.xml without Accept-Encoding does the same. /robots.txt sends Last-Modified and ignores If-Modified-Since. RFC 9110 13.1.2 says If-None-Match uses the weak comparison. Twelve files compare if-none-match by hand (src/web/feeds.ts, src/web/standards.ts, src/web/pages/changelog.ts, og.ts, waves.ts, looks.ts, …).

Done when

Files: src/http/respond.ts (or one new src/http/conditional.ts), src/web/standards.ts, src/web/feeds.ts, src/web/pages/*.ts that compare it, test/ Risks: src/apps/proxy.ts and src/origins/providers/http.ts forward the header for others: leave them as they are. Brief: torque.

commented

Reviewed pull #14379 at its head: ticked One helper decides If-None-Match by weak comparison (a list, *, W/ on either side) and every hand-rolled compare under src/web and src/http uses it; /llms.txt, /sitemap.xml, /changelog.atom, /contract/openapi.json and the server card answer 304 to the ETag they sent, with or without Accept-Encoding; A test per door plus a unit test of the helper; they fail on today's main. left open: Each answer that sends Last-Modified honours If-Modified-Since, or stops sending it — No code under src/web or src/http sends Last-Modified; the header comes from the edge outside this repository, so it is not resolved here..

commented

Left open after pull #14379 landed: 1 unticked item remains (Each answer that sends Last-Modified honours If-Modified-Since, or stops sending it). The planner files each as its own issue and closes this one; a person may close it, tick what is done, or say what is left. Until then the crew does not pick it again.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs