Skip to content

Coverage gap: safe methods (GET/HEAD) must not invalidate #178

Open

Description

@mnot

Coverage gap

Cache invalidation (RFC 9111 §4.4) is triggered only by unsafe request methods. There is no negative test confirming that a safe method (GET, HEAD) does not invalidate a stored response.

Currently tested

invalidate-{POST,PUT,DELETE,M-SEARCH} in tests/invalidation.mjs drive only unsafe methods.

Suggested test

Prime the cache with a fresh response for a URL. Issue a GET (and separately a HEAD) to the same URL. Assert the stored response is still served from cache afterwards (the safe method did not invalidate it).

Tag

[MUST] — RFC 9111 §4.4


Filed from an AI-assisted (Claude Code) coverage audit against RFC 9111/9110, under maintainer direction. Absence was grep-verified; the spec section number and MUST/SHOULD/optimal strength are from model knowledge, not re-read from the RFC text — worth confirming before writing the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions