← Rule catalog
lowexperimentaldiscoverability

Markdown negotiation works but omits Vary: Accept

CONTENT-NEG-004 · v1.0

What it detects

Markdown content negotiation demonstrably works on the homepage, but the response omits 'Vary: Accept'.

Why it matters

Without declaring that the response varies by Accept, a cache sitting in front of the site (a CDN, a shared proxy) can serve the wrong representation — HTML to an agent that asked for Markdown, or vice versa — to whichever client happens to hit the cache next.

How to fix

- Send `curl -I -H "Accept: text/markdown" <homepage>` and check the `Vary` response header. - Add `Vary: Accept` to the content-negotiated response (in addition to any existing Vary values, e.g. `Vary: Accept, Accept-Encoding`) so downstream caches and CDNs store the HTML and Markdown representations as separate cache entries. - Configure this at whichever layer sets Content-Type for the negotiated response — your app framework's response headers, a CDN edge rule, or reverse-proxy config. - Verify: `curl -I -H "Accept: text/markdown" <homepage>` and confirm the `Vary` header includes `Accept`.

References

Last reviewed: 2026-09-01 · rule v1.0