haproxy/reg-tests/lua/httpclient_action.lua
William Lallemand 4ed0a3a883 REGTESTS: httpclient/lua: test the lua task timeout with the httpclient
Test the httpclient when the lua action timeout. The lua timeout is
reached before the httpclient is ended. This test that the httpclient
are correctly cleaned when destroying the hlua context.

Must be backported as far as 2.5.
2022-10-20 18:48:17 +02:00

9 lines
211 B
Lua

function test()
local httpclient = core.httpclient()
local response = httpclient:get{url="http://127.0.0.1", headers={ [ "Host" ] = { "localhost" } }}
end
core.register_action("test", {"tcp-req"}, test, 0)