aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http
diff options
context:
space:
mode:
authorgrosser <grosser.michael@gmail.com>2012-09-22 19:36:45 -0700
committergrosser <grosser.michael@gmail.com>2012-09-24 17:24:18 -0700
commit9e2948e750fa3f641f20adad4b4ecae89b35faa7 (patch)
treefb7809b1bf5cf07c815568153570eb1fa95301b5 /actionpack/lib/action_dispatch/http
parent133d42bc0fe4926800ff91a587e2ebeb405c3a11 (diff)
downloadrails-9e2948e750fa3f641f20adad4b4ecae89b35faa7.tar.gz
rails-9e2948e750fa3f641f20adad4b4ecae89b35faa7.tar.bz2
rails-9e2948e750fa3f641f20adad4b4ecae89b35faa7.zip
depreacte unused Mime::Type#verify_request? and Mime::Type.browser_generated_types
Diffstat (limited to 'actionpack/lib/action_dispatch/http')
-rw-r--r--actionpack/lib/action_dispatch/http/mime_type.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb
index f86ae26b8a..3d560518e1 100644
--- a/actionpack/lib/action_dispatch/http/mime_type.rb
+++ b/actionpack/lib/action_dispatch/http/mime_type.rb
@@ -57,7 +57,6 @@ module Mime
# i.e. following a link, getting an image or posting a form. CSRF protection
# only needs to protect against these types.
@@browser_generated_types = Set.new [:html, :url_encoded_form, :multipart_form, :text]
- cattr_reader :browser_generated_types
attr_reader :symbol
@register_callbacks = []
@@ -276,9 +275,15 @@ module Mime
# Returns true if Action Pack should check requests using this Mime Type for possible request forgery. See
# ActionController::RequestForgeryProtection.
def verify_request?
+ ActiveSupport::Deprecation.warn "Mime::Type#verify_request? is deprecated and will be removed in Rails 4.1"
@@browser_generated_types.include?(to_sym)
end
+ def self.browser_generated_types
+ ActiveSupport::Deprecation.warn "Mime::Type.browser_generated_types is deprecated and will be removed in Rails 4.1"
+ @@browser_generated_types
+ end
+
def html?
@@html_types.include?(to_sym) || @string =~ /html/
end