Sha256: f3160d8a0d4abdc4f4c99b7d0c5cd5d3a3d628a9223501b8302986d908586fb0

Contents?: true

Size: 1.54 KB

Versions: 96

Compression:

Stored size: 1.54 KB

Contents

# Build list of Mime types for HTTP responses
# http://www.iana.org/assignments/media-types/

Mime::Type.register "text/html", :html, %w( application/xhtml+xml ), %w( xhtml )
Mime::Type.register "text/plain", :text, [], %w(txt)
Mime::Type.register "text/javascript", :js, %w( application/javascript application/x-javascript )
Mime::Type.register "text/css", :css
Mime::Type.register "text/calendar", :ics
Mime::Type.register "text/csv", :csv
Mime::Type.register "text/vcard", :vcf

Mime::Type.register "image/png", :png, [], %w(png)
Mime::Type.register "image/jpeg", :jpeg, [], %w(jpg jpeg jpe pjpeg)
Mime::Type.register "image/gif", :gif, [], %w(gif)
Mime::Type.register "image/bmp", :bmp, [], %w(bmp)
Mime::Type.register "image/tiff", :tiff, [], %w(tif tiff)

Mime::Type.register "video/mpeg", :mpeg, [], %w(mpg mpeg mpe)

Mime::Type.register "application/xml", :xml, %w( text/xml application/x-xml )
Mime::Type.register "application/rss+xml", :rss
Mime::Type.register "application/atom+xml", :atom
Mime::Type.register "application/x-yaml", :yaml, %w( text/yaml )

Mime::Type.register "multipart/form-data", :multipart_form
Mime::Type.register "application/x-www-form-urlencoded", :url_encoded_form

# http://www.ietf.org/rfc/rfc4627.txt
# http://www.json.org/JSONRequest.html
Mime::Type.register "application/json", :json, %w( text/x-json application/jsonrequest )

Mime::Type.register "application/pdf", :pdf, [], %w(pdf)
Mime::Type.register "application/zip", :zip, [], %w(zip)

# Create Mime::ALL but do not add it to the SET.
Mime::ALL = Mime::Type.new("*/*", :all, [])

Version data entries

96 entries across 92 versions & 9 rubygems

Version Path
actionpack-4.2.11.3 lib/action_dispatch/http/mime_types.rb
actionpack-4.2.11.2 lib/action_dispatch/http/mime_types.rb
actionpack-4.2.11.1 lib/action_dispatch/http/mime_types.rb
actionpack-4.2.11 lib/action_dispatch/http/mime_types.rb
actionpack-4.2.10 lib/action_dispatch/http/mime_types.rb
actionpack-4.2.10.rc1 lib/action_dispatch/http/mime_types.rb
actionpack-4.2.9 lib/action_dispatch/http/mime_types.rb
actionpack-4.2.9.rc2 lib/action_dispatch/http/mime_types.rb
actionpack-4.2.9.rc1 lib/action_dispatch/http/mime_types.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/actionpack-4.2.8/lib/action_dispatch/http/mime_types.rb
actionpack-4.2.8 lib/action_dispatch/http/mime_types.rb
actionpack-4.2.8.rc1 lib/action_dispatch/http/mime_types.rb
actionpack-4.2.7.1 lib/action_dispatch/http/mime_types.rb
actionpack-4.2.7 lib/action_dispatch/http/mime_types.rb
actionpack-4.1.16 lib/action_dispatch/http/mime_types.rb
actionpack-4.1.16.rc1 lib/action_dispatch/http/mime_types.rb
actionpack-4.2.7.rc1 lib/action_dispatch/http/mime_types.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/http/mime_types.rb
actionpack-4.1.15 lib/action_dispatch/http/mime_types.rb
actionpack-4.2.6 lib/action_dispatch/http/mime_types.rb