diff options
author | Terence Sun <tsun1215@gmail.com> | 2015-01-31 19:15:42 -0800 |
---|---|---|
committer | Terence Sun <tsun1215@gmail.com> | 2015-02-08 12:03:56 -0500 |
commit | b9c63b0aae7a7f9ddf32e155b11a51bd9c441857 (patch) | |
tree | b258b2d5128ff0d29a571835815dc68380286e71 /actionpack/CHANGELOG.md | |
parent | de9a3748c436f849dd1877851115cd94663c2725 (diff) | |
download | rails-b9c63b0aae7a7f9ddf32e155b11a51bd9c441857.tar.gz rails-b9c63b0aae7a7f9ddf32e155b11a51bd9c441857.tar.bz2 rails-b9c63b0aae7a7f9ddf32e155b11a51bd9c441857.zip |
Explicitly ignored wildcard verbs from head_routes
In match_head_routes, deleted the routes in which request.request_method was empty (matches all HTTP verbs) when responding to a HEAD request. This prevents catch-all routes (such as Racks) from intercepting the HEAD request.
Fixes #18698
Diffstat (limited to 'actionpack/CHANGELOG.md')
-rw-r--r-- | actionpack/CHANGELOG.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 8e1820e810..8298a199d8 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,3 +1,23 @@ +* Explicitly ignored wildcard verbs when searching for HEAD routes before fallback + + Fixes an issue where a mounted rack app at root would intercept the HEAD + request causing an incorrect behavior during the fall back to GET requests. + + Example: + ```ruby + draw do + get '/home' => 'test#index' + mount rack_app, at: '/' + end + head '/home' + assert_response :success + ``` + In this case, a HEAD request runs through the routes the first time and fails + to match anything. Then, it runs through the list with the fallback and matches + `get '/home'`. The original behavior would match the rack app in the first pass. + + *Terence Sun* + * Migrating xhr methods to keyword arguments syntax in `ActionController::TestCase` and `ActionDispatch::Integration` |