The error is about the response, not the post data. So you may want to take a look at that.
Also, it would probably be useful if you would include informations about what you are actually trying to do, the complete configuration, and the lua script.
If it wouldn’t be for the error message, we wouldn’t even know that this is about a LUA script …
core.register_service(“check_services”, “http”, function(applet)
local admin_path = fs.s_split(applet.path,‘/’,3)
local msg = “error!”
if (admin_path[3] ~= nil and admin_path[3] ~= “”) then
local hash = fs.hexdecode(admin_path[3])
if hash ~= nil then
local cache = applet:get_var(‘proc.’…hash)
if not cache then
msg = ‘exist’
end
end
end
applet:set_status(200)
applet:add_header(“Content-Type”, “text/plain”)
applet:add_header(“Server”, version)
applet:start_response()
applet:send(msg)
end)
Built with network namespace support.
Built with zlib version : 1.2.11
Running on zlib version : 1.2.11
Compression algorithms supported : identity(“identity”), deflate(“deflate”), raw-deflate(“deflate”), gzip(“gzip”)
Built with PCRE version : 8.40 2017-01-11
Running on PCRE version : 8.40 2017-01-11
PCRE library supports JIT : yes
Built with multi-threading support.
Encrypted password support via crypt(3): yes
Built with transparent proxy support using: IP_BINDANY IPV6_BINDANY
Built with Lua version : Lua 5.3.4
Built with OpenSSL version : OpenSSL 1.0.2k-freebsd 26 Jan 2017
Running on OpenSSL version : OpenSSL 1.0.2k-freebsd 26 Jan 2017
OpenSSL library supports TLS extensions : yes
OpenSSL library supports SNI : yes
OpenSSL library supports : SSLv3 TLSv1.0 TLSv1.1 TLSv1.2
Available polling systems :
kqueue : pref=300, test result OK
poll : pref=200, test result OK
select : pref=150, test result OK
Total: 3 (3 usable), will use kqueue.
Available filters :
[TRACE] trace
[COMP] compression
[SPOE] spoe
core.register_action(“save_backend”, { “http-req” }, function(applet)
local body = applet.f:req_body()
if haproxy_redis(body) then
applet.http:req_add_header(“redis-backend”,‘save’)
end
end)