From 91d99e2f5312688d99583a2ed5a08e17022a4218 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 6 Dec 2006 23:06:38 +0000 Subject: More thorough JSON tests. Use application/json by default, per rfc4627. References #4185. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5695 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/mime_types.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_controller/mime_types.rb') diff --git a/actionpack/lib/action_controller/mime_types.rb b/actionpack/lib/action_controller/mime_types.rb index 4b6a00da1d..bc458d85fa 100644 --- a/actionpack/lib/action_controller/mime_types.rb +++ b/actionpack/lib/action_controller/mime_types.rb @@ -2,10 +2,12 @@ Mime::Type.register "*/*", :all Mime::Type.register "text/plain", :text Mime::Type.register "text/html", :html, %w( application/xhtml+xml ), %w( xhtml ) Mime::Type.register "text/javascript", :js, %w( application/javascript application/x-javascript ) -Mime::Type.register "text/x-json", :json, %w( application/x-json ) Mime::Type.register "text/calendar", :ics Mime::Type.register "text/csv", :csv 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 ) \ No newline at end of file +Mime::Type.register "application/x-yaml", :yaml, %w( text/yaml ) + +# http://www.ietf.org/rfc/rfc4627.txt +Mime::Type.register "application/json", :json, %w( text/x-json ) -- cgit v1.2.3