aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorBenjamin Fleischer <github@benjaminfleischer.com>2016-02-16 10:17:33 -0600
committerBenjamin Fleischer <github@benjaminfleischer.com>2016-02-16 21:44:23 -0600
commitc4d90b70f4f27a527e9c2cd3af6cebf560b8df98 (patch)
tree88ae67f566249f46d32e5aba48f158784cb24822 /actionpack/lib
parentb0b61b62f9c27eff5b9e0797a0de0d35d64d1620 (diff)
downloadrails-c4d90b70f4f27a527e9c2cd3af6cebf560b8df98.tar.gz
rails-c4d90b70f4f27a527e9c2cd3af6cebf560b8df98.tar.bz2
rails-c4d90b70f4f27a527e9c2cd3af6cebf560b8df98.zip
The JSON API media type should only work wih a JSON API handler
Since the media type 'application/vnd.api+json' is a spec, it is inappropriate to handle it with the JSON renderer. This PR removes support for a JSON API media type. I would recommend the media type be registered on its own as `jsonapi` when a jsonapi Renderer and deserializer (Http::Parameters::DEFAULT_PARSERS) are added. Is related to work in https://github.com/rails/rails/pull/21496
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/http/mime_types.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_types.rb b/actionpack/lib/action_dispatch/http/mime_types.rb
index 8356d1a238..de7c181ff0 100644
--- a/actionpack/lib/action_dispatch/http/mime_types.rb
+++ b/actionpack/lib/action_dispatch/http/mime_types.rb
@@ -28,7 +28,7 @@ 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 application/vnd.api+json )
+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)