aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-09-25 07:20:57 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-09-25 07:20:57 -0700
commita05a079c109ebbafd8112be0044c9d82b4a28d97 (patch)
tree9dfa7711314751de87f5ab215cc97c7adc6ec75b /actionpack/lib/action_dispatch
parent0409c69faaf7891bd2eddd73cc794c85890dc233 (diff)
parent9e2948e750fa3f641f20adad4b4ecae89b35faa7 (diff)
downloadrails-a05a079c109ebbafd8112be0044c9d82b4a28d97.tar.gz
rails-a05a079c109ebbafd8112be0044c9d82b4a28d97.tar.bz2
rails-a05a079c109ebbafd8112be0044c9d82b4a28d97.zip
Merge pull request #7738 from grosser/verified_request
remove unused Mime::Type#verify_request?
Diffstat (limited to 'actionpack/lib/action_dispatch')
-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