Permalink
Browse files

Added OPTIONS to list of default accepted HTTP methods (closes #10449)…

… [holoway]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8425 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent c92a7ce commit 26e10218bc5e5c899b88f8d08b8abfb251b3af10 @dhh dhh committed Dec 17, 2007
View
@@ -1,5 +1,7 @@
*2.0.2* (December 16th, 2007)
+* Added OPTIONS to list of default accepted HTTP methods #10449 [holoway]
+
* Added option to pass proc to ActionController::Base.asset_host for maximum configurability #10521 [chuyeow]. Example:
ActionController::Base.asset_host = Proc.new { |source|
@@ -4,7 +4,7 @@
module ActionController
# HTTP methods which are accepted by default.
- ACCEPTED_HTTP_METHODS = Set.new(%w( get head put post delete ))
+ ACCEPTED_HTTP_METHODS = Set.new(%w( get head put post delete options ))
# CgiRequest and TestRequest provide concrete implementations.
class AbstractRequest
@@ -316,7 +316,7 @@ def test_invalid_http_method_raises_exception
def test_allow_method_hacking_on_post
set_request_method_to :post
- [:get, :head, :put, :post, :delete].each do |method|
+ [:get, :head, :options, :put, :post, :delete].each do |method|
@request.instance_eval { @parameters = { :_method => method } ; @request_method = nil }
assert_equal(method == :head ? :get : method, @request.method)
end

0 comments on commit 26e1021

Please sign in to comment.