feat: add `vary` header for `accept-encoding` when compression
it's only appended when either --compression or --compression-static is enabled
Diff
src/handler.rs | 8 ++++++++
1 file changed, 8 insertions(+)
@@ -235,6 +235,14 @@ impl RequestHandler {
}
}
if self.opts.compression || compression_static {
resp.headers_mut().append(
hyper::header::VARY,
hyper::header::HeaderValue::from_name(hyper::header::ACCEPT_ENCODING),
);
}
if self.opts.compression && !is_precompressed {
resp = match compression::auto(method, headers, resp) {