Disabled some debug messages in tracings

Added ability to avoid parsing JSON payload when specifying ignore_post_payload_parse = something. This is useful in case of a HTTP post where you do not want to parse it.

Example:
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
local json = require "dkjson"

-- Use ignore_post_payload_parse BEFORE calling 'require "lua_utils"'
ignore_post_payload_parse = 1
require "lua_utils"

sendHTTPContentTypeHeader('application/json')
local info, pos, err = json.decode(_POST["payload"], 1, nil)
This commit is contained in:
Luca Deri 2019-02-06 15:28:18 +01:00
parent 500964c457
commit 937ee52de7
3 changed files with 7 additions and 2 deletions

View file

@ -1581,7 +1581,10 @@ end
-- #################################################################
if(pragma_once) then
parsePOSTpayload()
if(ignore_post_payload_parse == nil) then
parsePOSTpayload()
end
clearNotAllowedParams()
lintParams()
pragma_once = 0