1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

retain previously set vary headers when using compress (#2798)

* retain previously set vary headers when using compress
This commit is contained in:
Rob Ede
2022-06-30 09:19:16 +01:00
committed by GitHub
parent 0dba6310c6
commit 06c7945801
3 changed files with 31 additions and 4 deletions

View File

@ -257,7 +257,7 @@ fn update_head(encoding: ContentEncoding, head: &mut ResponseHead) {
head.headers_mut()
.insert(header::CONTENT_ENCODING, encoding.to_header_value());
head.headers_mut()
.insert(header::VARY, HeaderValue::from_static("accept-encoding"));
.append(header::VARY, HeaderValue::from_static("accept-encoding"));
head.no_chunking(false);
}