mirror of
https://github.com/openappsec/attachment.git
synced 2026-01-02 14:44:42 +03:00
remove fini session from header
This commit is contained in:
@@ -283,6 +283,8 @@ function NanoHandler.body_filter(conf)
|
|||||||
if chunk and #chunk > 0 then
|
if chunk and #chunk > 0 then
|
||||||
ctx.body_seen = true
|
ctx.body_seen = true
|
||||||
|
|
||||||
|
-- Only send to nano if inspection not yet complete
|
||||||
|
if not ctx.inspection_complete then
|
||||||
local ok, result = pcall(function()
|
local ok, result = pcall(function()
|
||||||
return {nano.send_body(session_id, session_data, chunk, nano.HttpChunkType.HTTP_RESPONSE_BODY)}
|
return {nano.send_body(session_id, session_data, chunk, nano.HttpChunkType.HTTP_RESPONSE_BODY)}
|
||||||
end)
|
end)
|
||||||
@@ -319,6 +321,11 @@ function NanoHandler.body_filter(conf)
|
|||||||
else
|
else
|
||||||
kong.log.err("nano.send_body failed, failing open: ", tostring(result))
|
kong.log.err("nano.send_body failed, failing open: ", tostring(result))
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
-- Inspection already complete - just count the chunk and pass through
|
||||||
|
kong.log.err("CHUNK #", ctx.body_buffer_chunk, " - skipping nano.send_body (inspection complete)")
|
||||||
|
ctx.body_buffer_chunk = ctx.body_buffer_chunk + 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if eof or (ctx.expect_body == false and not ctx.body_seen) then
|
if eof or (ctx.expect_body == false and not ctx.body_seen) then
|
||||||
|
|||||||
Reference in New Issue
Block a user