aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJeremy Kemper <jeremykemper@gmail.com>2015-02-26 17:04:08 -0700
committerJeremy Kemper <jeremykemper@gmail.com>2015-02-26 17:04:08 -0700
commita13e52b42279a003e57969dc827bdbee5fdbe967 (patch)
tree0c9e9ceb0748df91400844f9027954b7204c393e /actionpack
parent38218929e9b3205a2a731660b3c5527937e1c015 (diff)
downloadrails-a13e52b42279a003e57969dc827bdbee5fdbe967.tar.gz
rails-a13e52b42279a003e57969dc827bdbee5fdbe967.tar.bz2
rails-a13e52b42279a003e57969dc827bdbee5fdbe967.zip
Revert "Merge pull request #18764 from tsun1215/master"
This reverts commit b6dd0c4ddebf5e7aab0a669915cb349ec65e5b88, reversing changes made to de9a3748c436f849dd1877851115cd94663c2725.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/journey/router.rb1
-rw-r--r--actionpack/test/dispatch/routing_test.rb9
2 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/journey/router.rb b/actionpack/lib/action_dispatch/journey/router.rb
index e9df984c86..2b036796ab 100644
--- a/actionpack/lib/action_dispatch/journey/router.rb
+++ b/actionpack/lib/action_dispatch/journey/router.rb
@@ -121,7 +121,6 @@ module ActionDispatch
end
def match_head_routes(routes, req)
- routes.delete_if { |route| route.verb == // }
head_routes = match_routes(routes, req)
if head_routes.empty?
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index d65d2e8e8f..b4502c19d6 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -3492,11 +3492,12 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
mount lambda { |env| [200, {}, [env['REQUEST_METHOD']]] }, at: '/'
end
- # HEAD request matches `get /home` rather than the lower-precedence
- # Rack app mounted at `/`
+ # TODO: HEAD request should match `get /home` rather than the
+ # lower-precedence Rack app mounted at `/`.
head '/home'
- assert_response :success
- assert_equal 'test#index', @response.body
+ assert_response :ok
+ #assert_equal 'test#index', @response.body
+ assert_equal 'HEAD', @response.body
# But the Rack app can still respond to its own HEAD requests.
head '/foobar'