This is an automated email from the ASF dual-hosted git repository.

shreemaanabhishek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 531950329 brotli partial response fix (#11087)
531950329 is described below

commit 5319503293c41cf41a2caa5cb944a12d40686c83
Author: Silent <[email protected]>
AuthorDate: Fri Mar 29 21:55:08 2024 +0530

    brotli partial response fix (#11087)
---
 apisix/plugins/brotli.lua | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/apisix/plugins/brotli.lua b/apisix/plugins/brotli.lua
index 4482fc0cd..031bd8ea9 100644
--- a/apisix/plugins/brotli.lua
+++ b/apisix/plugins/brotli.lua
@@ -239,7 +239,8 @@ function _M.body_filter(conf, ctx)
     end
 
     if eof then
-        ngx.arg[1] = ctx.compressor:finish()
+        -- overwriting the arg[1], results into partial response
+        ngx.arg[1] = ngx.arg[1] .. ctx.compressor:finish()
     end
 end
 

Reply via email to