nested exit test

This commit is contained in:
2022-03-12 21:50:52 +08:00
parent c989eeabb5
commit e873cca2df
2 changed files with 14 additions and 0 deletions
+4
View File
@@ -17,5 +17,9 @@ server {
location /api/ngx/test/uri { location /api/ngx/test/uri {
content_by_lua_file $resty_loc/nginx/scripts/tests/uri.lua; content_by_lua_file $resty_loc/nginx/scripts/tests/uri.lua;
} }
location /api/ngx/test/nested_exit {
content_by_lua_file $resty_loc/nginx/scripts/tests/nested_exit.lua;
}
} }
+10
View File
@@ -0,0 +1,10 @@
local function nested_e()
ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR)
end
nested_e()
ngx.say("OK")
-- ➤ curl test.localhost:8088/api/ngx/test/nested_exit