openresty / openresty/lua-nginx-module
issue with ngx.exit
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.8k
- Forks
- 2.1k
- Avg merge
- 6h 1m
- Merged PRs (30d)
- 6
Description
os: Red Hat Enterprise Linux Server release 7.3
openresy: 1.17.8.2
ngx_lua: 0.10.17
as the document said: "When status >= 200 (i.e., ngx.HTTP_OK and above), it will interrupt the execution of the current request and return status code to Nginx.", but i use return ngx.exit(500) in content_by_lua* but the request still run header_filter, body_filter and log phase. and i took a quick look at the source code of ngx_lua, i found the flag exited set in ngx_http_lua_ffi_exit was less used.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading ngx_http_lua_ffi_exit and the handling of the exited flag in the ngx_lua source, then trace request processing after return ngx.exit(500) from content_by_lua*. Compare the observed header_filter, body_filter, and log phases with the ngx.exit documentation; done means the behavior is explained and the relevant code or documentation is corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, lua, nginx
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100