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
fix(request-termination): status_code cannot be set as null #9400
Conversation
@@ -1,5 +1,6 @@ | |||
local schema_def = require "kong.plugins.request-termination.schema" | |||
local v = require("spec.helpers").validate_plugin_config_schema | |||
local null = ngx.null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that this localization is unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be used in this line
local ok, err = v({status_code = null}, schema_def) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, my meaning is that we can use ngx.null
in this line, need not to localize it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it matters as it seems like a trivial style.🙂
0ee88ee
to
22b7f63
Compare
22b7f63
to
fccf89a
Compare
@dndx Please hit the merge button. |
a664ee7
to
e49e249
Compare
Summary
status_code
should not be allowed to be set to null, otherwise a 500 error will be returned.Full changelog
status_code
as nullFTI-4291