aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorHarry Marr <harry.marr@gmail.com>2015-03-20 18:13:59 +0000
committerHarry Marr <harry.marr@gmail.com>2015-03-20 18:13:59 +0000
commit34a52c6bce2f97398cef4790e49739ef8f865d11 (patch)
treee6a49554279e0742f9d65737460bcf7ead6ea743 /actionpack/test/dispatch/routing_test.rb
parent5154089c181e9b36753b193bd7ffb141e88232f1 (diff)
downloadrails-34a52c6bce2f97398cef4790e49739ef8f865d11.tar.gz
rails-34a52c6bce2f97398cef4790e49739ef8f865d11.tar.bz2
rails-34a52c6bce2f97398cef4790e49739ef8f865d11.zip
Respect routing precedence for HEAD requests
Fixes the issue described in #18764 - prevents Rack middleware from swallowing up HEAD requests that should have been matched by a higher-precedence `get` route, but still allows Rack middleware to respond to HEAD requests.
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index 55fc160ac8..c1a333cbaf 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -3492,12 +3492,11 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
mount lambda { |env| [200, {}, [env['REQUEST_METHOD']]] }, at: '/'
end
- # TODO: HEAD request should match `get /home` rather than the
+ # HEAD request should match `get /home` rather than the
# lower-precedence Rack app mounted at `/`.
head '/home'
assert_response :ok
- #assert_equal 'test#index', @response.body
- assert_equal 'HEAD', @response.body
+ assert_equal 'test#index', @response.body
# But the Rack app can still respond to its own HEAD requests.
head '/foobar'