daaku / go.httpgzip

Package httpgzip provides a http handler wrapper to transparently add gzip compression.
https://godoc.org/github.com/daaku/go.httpgzip
62 stars 6 forks source link

Set Vary header? #3

Closed joliss closed 10 years ago

joliss commented 11 years ago

Should we set Vary: Accept-Encoding, so the response gets cached correctly by any intermediary proxies (CloudFront, etc.)?

I think the Vary may get blown away if a subsequent handler sets a different Vary (e.g. Vary: Cookie), but perhaps it's still worth setting it to cover for most cases.

daaku commented 11 years ago

Agreed, it should do that.