mirror of
https://github.com/openappsec/attachment.git
synced 2026-01-02 14:44:42 +03:00
fix wrong close statement
This commit is contained in:
@@ -93,6 +93,7 @@ function NanoHandler.access(conf)
|
||||
local result = nano.handle_custom_response(session_data, response)
|
||||
nano.cleanup_all()
|
||||
return result
|
||||
end
|
||||
else
|
||||
kong.log.err("Request body not in memory, attempting to read from buffer/file")
|
||||
|
||||
@@ -104,6 +105,7 @@ function NanoHandler.access(conf)
|
||||
nano.fini_session(session_data)
|
||||
kong.ctx.plugin.blocked = true
|
||||
return nano.handle_custom_response(session_data, response)
|
||||
end
|
||||
else
|
||||
local body_file = ngx.var.request_body_file
|
||||
if body_file then
|
||||
@@ -149,6 +151,8 @@ function NanoHandler.access(conf)
|
||||
local result = nano.handle_custom_response(session_data, response)
|
||||
nano.cleanup_all()
|
||||
return result
|
||||
end
|
||||
end
|
||||
else
|
||||
local ok, verdict, response = pcall(function()
|
||||
return nano.end_inspection(session_id, session_data, nano.HttpChunkType.HTTP_REQUEST_END)
|
||||
@@ -304,6 +308,7 @@ function NanoHandler.body_filter(conf)
|
||||
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
|
||||
local ok, result = pcall(function()
|
||||
|
||||
Reference in New Issue
Block a user