-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Return 405 correctly even if version is using as header and wrong request method #1362
Conversation
@dblock Could you take a look this pull request? |
@@ -231,7 +231,7 @@ def run | |||
|
|||
run_filters before_validations, :before_validation | |||
|
|||
run_validators validations, request unless @method_not_allowed | |||
run_validators validations, request unless env[Grape::Env::GRAPE_METHOD_NOT_ALLOWED] |
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 see it now :) Better.
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 might want to audit the use if @variable
elsewhere, we have at least an @app_response
in a formatter middleware, @named_params
in a DSL helper and @versions
in routing.
This worked everywhere where I saw problems, feel free to cut 0.16.2, which is #1360. I would review the use of |
The |
I should have caught |
I've mistaken the coding. Sorry for the bad patch. Btw, we can release the v.0.16.2 now. I'll prepare it soon. |
This reverts commit a0166e7.
I'll try to fix this problem drastically.