-
Notifications
You must be signed in to change notification settings - Fork 2k
feature: allow use of ngx.exit() in the context of body_filter_by_lua_* #1009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@rainingmaster Always returning |
@agentzh run |
@rainingmaster Yes, otherwise the content handler will simply generate more data and continue calling the body filter chain. |
@rainingmaster I think we should just throw out a Lua exception when a meaningless status code is provided as the argument. We should limit automatic nginx error logging in our Lua API. Catch the error on the low level, and let the upper levels handle the error. This |
09259ba
to
c2c8bfd
Compare
1c73e76
to
aefc821
Compare
@agentzh Can you help me see if there are any more questions? We plan to use massively online. Thanks:) |
0496697
to
6802279
Compare
@agentzh |
Question: this feature will be included in some future release? thanks |
@luksbelt Well, @thibaultcha might help take care of this. |
461f1cf
to
df726d0
Compare
@thibaultcha could you help me check these code, I have rebase the newest code now, thank you |
df726d0
to
83ff3e8
Compare
@doujiang24 Finish, could you help me check again? |
@thibaultcha Hello, could you help me review this pr? So thanks |
This pull request is now in conflict :( |
f924579
to
fef2581
Compare
This pull request is now in conflict :( |
This pull request is now in conflict :( |
This pull request is now in conflict :( |
This pull request is now in conflict :( |
This pull request is now in conflict :( |
This pull request is now in conflict :( |
Ported from header_filter_by_lua, I have try to add a new feature that add
ngx.exit()
in the context ofbody_filter_by_lua
. But like in the context ofbalance_by_lua_*
, we can not set return code. Runngx.exit()
inbody_filter_by_lua_*
will stop immediately, but return a code before.I hereby granted the copyright of the changes in this pull request
to the authors of this lua-nginx-module project.