-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fixed status check #2032
Fixed status check #2032
Conversation
Signed-off-by: Nick <nick.nellis@weather.com>
@@ -117,7 +117,7 @@ int StreamHandleWrapper::luaRespond(lua_State* state) { | |||
uint64_t status; | |||
if (headers->Status() == nullptr || | |||
!StringUtil::atoul(headers->Status()->value().c_str(), status) || status < 200 || | |||
status >= 500) { | |||
status >= 600) { |
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.
Thanks. What about the status < 200
clause and claim in error that the range 100-599
?
Signed-off-by: Nick Nellis <nick.nellis@weather.com>
@htuch fixed lowerbound |
@@ -116,8 +116,8 @@ int StreamHandleWrapper::luaRespond(lua_State* state) { | |||
|
|||
uint64_t status; | |||
if (headers->Status() == nullptr || | |||
!StringUtil::atoul(headers->Status()->value().c_str(), status) || status < 200 || | |||
status >= 500) { | |||
!StringUtil::atoul(headers->Status()->value().c_str(), status) || status < 100 || |
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.
Informational (1xx) status codes have special meaning and we should not allow a Lua script to send them, as they will confuse the connection manager, so that part was correct, but the error message below is wrong. But the other one was a bug. Thank you for fixing. We should have a test though. Do you mind changing one of the response tests to use a 5xx status code? If you don't want to bother I can fix this later today.
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 am leaving town this afternoon and will be off for a few days. Otherwise i would be able to fix it after i get back.
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.
Either way. If you would like to contribute we can wait, otherwise I'm happy to fix it. If you want to go that route just close the PR and I will do another PR later today.
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.
You can add the fix, i would rather come back to it merged than wait
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.
Closing out in favor of #2034 |
Merge release-1.1 to master
Previous URL started returning a zip archive with a different checksum: bazelbuild/rules_android#43 Signed-off-by: JP Simard <jp@jpsim.com>
Previous URL started returning a zip archive with a different checksum: bazelbuild/rules_android#43 Signed-off-by: JP Simard <jp@jpsim.com>
Description:
Risk Level: Low