1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

application/gzip added as default mime type into mime type list

This commit is contained in:
Mehmet Emin İNAÇ 2016-02-13 18:03:11 +02:00
parent f800e00f9a
commit ff8bdafec4
3 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,7 @@
* Add application/gzip as a default mime type.
*Mehmet Emin İNAÇ*
* Add request encoding and response parsing to integration tests. * Add request encoding and response parsing to integration tests.
What previously was: What previously was:

View file

@ -32,3 +32,4 @@ Mime::Type.register "application/json", :json, %w( text/x-json application/jsonr
Mime::Type.register "application/pdf", :pdf, [], %w(pdf) Mime::Type.register "application/pdf", :pdf, [], %w(pdf)
Mime::Type.register "application/zip", :zip, [], %w(zip) Mime::Type.register "application/zip", :zip, [], %w(zip)
Mime::Type.register "application/gzip", :gzip, %w(application/x-gzip), %w(gz)

View file

@ -49,7 +49,7 @@ class MimeTypeTest < ActiveSupport::TestCase
test "parse application with trailing star" do test "parse application with trailing star" do
accept = "application/*" accept = "application/*"
expect = [Mime[:html], Mime[:js], Mime[:xml], Mime[:rss], Mime[:atom], Mime[:yaml], Mime[:url_encoded_form], Mime[:json], Mime[:pdf], Mime[:zip]] expect = [Mime[:html], Mime[:js], Mime[:xml], Mime[:rss], Mime[:atom], Mime[:yaml], Mime[:url_encoded_form], Mime[:json], Mime[:pdf], Mime[:zip], Mime[:gzip]]
parsed = Mime::Type.parse(accept) parsed = Mime::Type.parse(accept)
assert_equal expect, parsed assert_equal expect, parsed
end end