diff --git a/conf/local_macos/test.conf b/conf/local_macos/test.conf index bff4743..a1e0dd7 100644 --- a/conf/local_macos/test.conf +++ b/conf/local_macos/test.conf @@ -17,5 +17,9 @@ server { location /api/ngx/test/uri { 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; + } } diff --git a/test_scripts/nested_exit.lua b/test_scripts/nested_exit.lua new file mode 100644 index 0000000..22cd3fa --- /dev/null +++ b/test_scripts/nested_exit.lua @@ -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 + +