<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -19,12 +19,21 @@ module Mime
   #     end
   #   end
   class Type
-    @@html_types = Set.new [:html, :url_encoded_form, :multipart_form, :all]
+    @@html_types = Set.new [:html, :all]
     cattr_reader :html_types
 
-    # UNUSED, deprecate?
+    # These are the content types which browsers can generate without using ajax, flash, etc
+    # 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]
+    cattr_reader :browser_generated_types
+
+
     @@unverifiable_types = Set.new [:text, :json, :csv, :xml, :rss, :atom, :yaml]
-    cattr_reader :unverifiable_types
+    def self.unverifiable_types
+      ActiveSupport::Deprecation.warn(&quot;unverifiable_types is deprecated and has no effect&quot;, caller)
+      @@unverifiable_types
+    end
 
     # A simple helper class used in parsing the accept header
     class AcceptItem #:nodoc:
@@ -170,13 +179,17 @@ module Mime
     # Returns true if Action Pack should check requests using this Mime Type for possible request forgery.  See
     # ActionController::RequestForgerProtection.
     def verify_request?
-      html?
+      browser_generated?
     end
 
     def html?
       @@html_types.include?(to_sym) || @string =~ /html/
     end
 
+    def browser_generated?
+      @@browser_generated_types.include?(to_sym)
+    end
+
     private
       def method_missing(method, *args)
         if method.to_s =~ /(\w+)\?$/</diff>
      <filename>actionpack/lib/action_controller/mime_type.rb</filename>
    </modified>
    <modified>
      <diff>@@ -77,8 +77,8 @@ class MimeTypeTest &lt; Test::Unit::TestCase
     all_types.uniq!
     # Remove custom Mime::Type instances set in other tests, like Mime::GIF and Mime::IPHONE
     all_types.delete_if { |type| !Mime.const_defined?(type.to_s.upcase) }
-    verified, unverified = all_types.partition { |type| Mime::Type.html_types.include? type }
-    assert verified.each   { |type| assert  Mime.const_get(type.to_s.upcase).verify_request?, &quot;Mime Type is not verified: #{type.inspect}&quot; }
-    assert unverified.each { |type| assert !Mime.const_get(type.to_s.upcase).verify_request?, &quot;Mime Type is verified: #{type.inspect}&quot; }
+    verified, unverified = all_types.partition { |type| Mime::Type.browser_generated_types.include? type }
+    assert verified.each   { |type| assert  Mime.const_get(type.to_s.upcase).verify_request?, &quot;Verifiable Mime Type is not verified: #{type.inspect}&quot; }
+    assert unverified.each { |type| assert !Mime.const_get(type.to_s.upcase).verify_request?, &quot;Nonverifiable Mime Type is verified: #{type.inspect}&quot; }
   end
 end</diff>
      <filename>actionpack/test/controller/mime_type_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>00c46b5eeb858629ef1c7ab50f022aecccca42c3</id>
    </parent>
  </parents>
  <author>
    <name>Michael Koziarski</name>
    <email>michael@koziarski.com</email>
  </author>
  <url>http://github.com/rails/rails/commit/f1ad8b48aae3ee26613b3e77bc0056e120096846</url>
  <id>f1ad8b48aae3ee26613b3e77bc0056e120096846</id>
  <committed-date>2008-11-13T02:23:34-08:00</committed-date>
  <authored-date>2008-11-13T02:19:53-08:00</authored-date>
  <message>Instead of overriding html_types, base the verification on browser_generated_types.

Also Deprecate the old unverifiable types.

[#1145 state:committed]</message>
  <tree>6df93a9c456ee4bcb91ca33d57957ae7d838d4f1</tree>
  <committer>
    <name>Michael Koziarski</name>
    <email>michael@koziarski.com</email>
  </committer>
</commit>
