aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorLewis Marshall <lewis.marshall@econsultancy.com>2013-04-22 14:09:41 +0100
committerLewis Marshall <lewis.marshall@econsultancy.com>2013-04-22 14:31:10 +0100
commitec462b4de7904e0e55a312940e88b9e825bf955c (patch)
treec04eacf5afa5a62c3bbb287f216b07c422b47943 /actionpack/lib/action_dispatch
parent07acf7b13d98eb8e3dc6628952ca908a020bbdce (diff)
downloadrails-ec462b4de7904e0e55a312940e88b9e825bf955c.tar.gz
rails-ec462b4de7904e0e55a312940e88b9e825bf955c.tar.bz2
rails-ec462b4de7904e0e55a312940e88b9e825bf955c.zip
Return a 405 response for unknown HTTP methods
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/middleware/exception_wrapper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb b/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb
index 7489ce8028..0a19381c89 100644
--- a/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb
+++ b/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb
@@ -9,6 +9,7 @@ module ActionDispatch
'ActionController::RoutingError' => :not_found,
'AbstractController::ActionNotFound' => :not_found,
'ActionController::MethodNotAllowed' => :method_not_allowed,
+ 'ActionController::UnknownHttpMethod' => :method_not_allowed,
'ActionController::NotImplemented' => :not_implemented,
'ActionController::UnknownFormat' => :not_acceptable,
'ActionController::InvalidAuthenticityToken' => :unprocessable_entity,