thoughtworks/pacto — pull request #53 by maxlinc (2013-10-31 22:18:53+00:00)
Title: Pacto generator - use HTTP Vary header for smart generation

The HTTP spec has the response "Vary field value advises the user agent about the criteria that were used to select the representation."

So it seems like a pretty good way to figure out which request headers are important. This PR switches from blacklisting request headers (via INFORMATIONAL_REQUEST_HEADERS) to using the Vary to select headers. This also encourages good service design - if your service returns appropriate Vary headers, we'll record a better Contract.

I wish there was an equivalent for response headers....

(Tech Debt note: header case sensitivity was getting annoying. Might be worth getting a case insensitive hash. If we do, I'd prefer a simple class vs external dependencies or monkeypatching)