From d0b6bd64529d1538ab10a6b7027272b34e69ee4f Mon Sep 17 00:00:00 2001 From: Masaori Koshiba Date: Tue, 28 Jan 2025 08:10:51 +0900 Subject: [PATCH] [compress] Make warning if compress plugin has cache and range-request config (#11986) (cherry picked from commit d543c8a30e4447a422bf688cb0299cf3074ece51) --- plugins/compress/configuration.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/compress/configuration.cc b/plugins/compress/configuration.cc index 208ea79d8dd..82cb15d75de 100644 --- a/plugins/compress/configuration.cc +++ b/plugins/compress/configuration.cc @@ -405,6 +405,11 @@ Configuration::Parse(const char *path) // Update the defaults for the last host configuration too, if needed. current_host_configuration->update_defaults(); + // Check combination of configs + if (!current_host_configuration->cache() && current_host_configuration->range_request()) { + warning("Combination of 'cache false' and 'range-request true' might deliver corrupted content"); + } + if (state != kParseStart) { warning("the parser state indicates that data was expected when it reached the end of the file (%d)", state); }