Subject: Re: [httpwg/http-extensions] Short Circuit (#232)

From: HTTP issue updates <[email-masked]>
Date: Tue, 22 Aug 2017 10:46:34 -0700

I like this idea because it allows for what I've typically called 'branched vary logic', ie. multiple variations for a URL do not all have to share the same Vary header.  This use case is [described in detail in a post I made](https://www.fastly.com/blog/getting-most-out-vary-fastly) on the Fastly engineering blog today under the heading "Reducing granularity with variable Vary values for the same URL"

With Key, there's a baked in requirement for all variations to have the same key recipe, which simplifies implementation and allows for higher performance at scale, but appears to scupper the potential for branched logic.  However, Key could have a mechanism that halts the construction of the key at the current rule if some condition is met.   Straw man syntax proposal:

```
Key: AcmeCo-Auth-State; param=role; end-on-match="anon", AcmeCo-ABTestFlags
```

This says vary on the `role` subfield of the `AcmeCo-Auth-State` header, and if that value is *not* "anon", also vary on `AcmeCo-ABTestFlags`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/httpwg/http-extensions/issues/232#issuecomment-324101206