Vary Variant Mapping
Map how the vary header splits one key into variant sub-entries, since a leak or a miss behaves differently per variant rather than per path
Use when: a response carries vary and later tests need to know whether two requests share a stored variant or occupy separate ones
Avoid when: the response carries no vary directive and no other header hints at content negotiation
Procedure
- Record the exact vary token list from the response and note which request headers it names.
- For each named request header, issue two requests differing only in that header and observe whether the status token separates them.
- Include cookie and authorization in the map when the origin names them, since those variants carry identity-bound content.
- Check whether vary is present on the first response but missing on a later one for the same path, which marks an inconsistent policy.
- Record the variant count actually observed rather than the theoretical count implied by the header list.
- Carry the map into the audit phase as the model of which requests can collide and which are guaranteed to be isolated.
Signals
- Vary names a header the edge does not include in its lookup at all
- One variant is served fresh while another for the same path is served from storage
- The vary list differs between a first response and a repeat response on the same path
- Vary lists an entire header class such as cookie, implying many stored variants
Patterns
1. Variant map
path: /search
vary: accept-encoding, accept-language
observed variants: en, fr, default -> 3 entries, keyed by accept-language only
2. Split check
two requests, same path, one header differing: same status token means one entry serves both variants, different token means the header splits the key
3. Inconsistent policy
vary present on first answer and absent later: record the transition, because the missing list is where two variants can start to collide
Pitfalls
- Assuming vary always appears in the stored entry when it is only sent on the first response
- Counting theoretical variants from the header list instead of the ones actually observed
- Forgetting accept-encoding, which splits variants on every path and hides the dimension you meant to study
Done when
- A variant map records the vary list and the observed variant count per path
- Every named header has a separate observation proving keyed, unkeyed or inconsistent behaviour