mirror of
https://github.com/openappsec/attachment.git
synced 2026-01-02 14:44:42 +03:00
add missing content-length update
This commit is contained in:
@@ -300,6 +300,9 @@ function NanoHandler.body_filter(conf)
|
|||||||
return
|
return
|
||||||
else
|
else
|
||||||
local buffered_data = table.concat(ctx.response_buffer)
|
local buffered_data = table.concat(ctx.response_buffer)
|
||||||
|
local original_content_length = tonumber(ngx.header["Content-Length"]) or #buffered_data
|
||||||
|
local total_diff = ctx.content_length_diff or 0
|
||||||
|
ngx.header["Content-Length"] = original_content_length + total_diff
|
||||||
ngx.arg[1] = buffered_data
|
ngx.arg[1] = buffered_data
|
||||||
ctx.response_buffer = nil
|
ctx.response_buffer = nil
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user