From 73a469a7de66d05dee3324ea2b6075b2fbbbdba0 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Sun, 17 Aug 2025 20:45:00 +0200 Subject: [PATCH] Properly use Vary header --- src/worker/local_handler.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/worker/local_handler.c b/src/worker/local_handler.c index 7fe5b16..76702dc 100644 --- a/src/worker/local_handler.c +++ b/src/worker/local_handler.c @@ -208,9 +208,9 @@ static int local_handler(client_ctx_t *ctx) { enc = COMPRESS_GZ; } } - if (enc != 0) { - http_add_header_field(&res->hdr, "Vary", "Accept-Encoding"); - } + } + if (uri->meta->filename_comp_br[0] != 0 || uri->meta->filename_comp_gz[0] != 0) { + http_add_header_field(&res->hdr, "Vary", "Accept-Encoding"); } buf1[0] = 0;