Revert "Merge pull request #18764 from tsun1215/master"

This reverts commit b6dd0c4dde, reversing
changes made to de9a3748c4.
This commit is contained in:
Jeremy Kemper 2015-02-26 17:04:08 -07:00
parent 38218929e9
commit a13e52b422
2 changed files with 5 additions and 5 deletions

View File

@ -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?

View File

@ -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'