diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2013-01-16 03:04:14 -0800 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2013-01-16 03:04:14 -0800 |
commit | d3dcb4b9b26c1ea8b44ee8660af10683cd41e35f (patch) | |
tree | 6ea875a7d2f0be3b46d08a4121818e1d5196918f /actionpack/lib/action_dispatch/http/request.rb | |
parent | fd990f24df87c0a445ea6a2a2df6fa8fbd3556b1 (diff) | |
parent | 5f3b40e824cce3f6dcdfac63fa47bcd80d67dd5a (diff) | |
download | rails-d3dcb4b9b26c1ea8b44ee8660af10683cd41e35f.tar.gz rails-d3dcb4b9b26c1ea8b44ee8660af10683cd41e35f.tar.bz2 rails-d3dcb4b9b26c1ea8b44ee8660af10683cd41e35f.zip |
Merge pull request #8632 from asanghi/3-2-stable
Fixes #8631 request post? detection should remain unaffected by local inflections such as POS for Point Of Sale
Diffstat (limited to 'actionpack/lib/action_dispatch/http/request.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/http/request.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index 2fac9668c1..31155732d2 100644 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -56,7 +56,12 @@ module ActionDispatch RFC5789 = %w(PATCH) HTTP_METHODS = RFC2616 + RFC2518 + RFC3253 + RFC3648 + RFC3744 + RFC5323 + RFC5789 - HTTP_METHOD_LOOKUP = Hash.new { |h, m| h[m] = m.underscore.to_sym if HTTP_METHODS.include?(m) } + HTTP_METHOD_LOOKUP = {} + + # Populate the HTTP method lookup cache + HTTP_METHODS.each do |method| + HTTP_METHOD_LOOKUP[method] = method.underscore.to_sym + end # Returns the HTTP \method that the application should see. # In the case where the \method was overridden by a middleware |