remove fini session from header

This commit is contained in:
wiaamm
2025-11-30 23:44:48 +02:00
parent fe67603e08
commit a5864bf8f0

View File

@@ -283,6 +283,8 @@ function NanoHandler.body_filter(conf)
if chunk and #chunk > 0 then
ctx.body_seen = true
-- Only send to nano if inspection not yet complete
if not ctx.inspection_complete then
local ok, result = pcall(function()
return {nano.send_body(session_id, session_data, chunk, nano.HttpChunkType.HTTP_RESPONSE_BODY)}
end)
@@ -319,6 +321,11 @@ function NanoHandler.body_filter(conf)
else
kong.log.err("nano.send_body failed, failing open: ", tostring(result))
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
if eof or (ctx.expect_body == false and not ctx.body_seen) then