From 53d070349b3bf9ea7384684009481c705d8f4e02 Mon Sep 17 00:00:00 2001 From: Wangchong Zhou Date: Tue, 21 Jan 2025 19:41:14 +0800 Subject: [PATCH] fix(llm): fix gzip handling when using multiple AI plugins --- kong/llm/plugin/shared-filters/normalize-response-header.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kong/llm/plugin/shared-filters/normalize-response-header.lua b/kong/llm/plugin/shared-filters/normalize-response-header.lua index 3ab240a1527..3420f5328c5 100644 --- a/kong/llm/plugin/shared-filters/normalize-response-header.lua +++ b/kong/llm/plugin/shared-filters/normalize-response-header.lua @@ -32,7 +32,7 @@ function _M:run(_) else kong.response.clear_header("Content-Encoding") end - else + elseif not get_global_ctx("response_body_sent") then kong.response.clear_header("Content-Encoding") end return true