mirror of https://github.com/rails/rails
Revert "Merge pull request #18764 from tsun1215/master"
This reverts commitb6dd0c4dde
, reversing changes made tode9a3748c4
.
This commit is contained in:
parent
38218929e9
commit
a13e52b422
|
@ -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?
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue