diff --git a/actionpack/lib/action_dispatch/http/mime_negotiation.rb b/actionpack/lib/action_dispatch/http/mime_negotiation.rb index 68ba1a8..8eaa085 100644 --- a/actionpack/lib/action_dispatch/http/mime_negotiation.rb +++ b/actionpack/lib/action_dispatch/http/mime_negotiation.rb @@ -15,10 +15,6 @@ module ActionDispatch end end - def content_type - content_mime_type && content_mime_type.to_s - end - # Returns the accepted MIME type for the request. def accepts @env["action_dispatch.request.accepts"] ||= begin diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index f03ae7f..b6112f9 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -377,8 +377,9 @@ class RequestTest < ActiveSupport::TestCase end test "content type" do - request = stub_request 'CONTENT_TYPE' => 'text/html' + request = stub_request 'CONTENT_TYPE' => 'text/html; charset=utf-8' assert_equal Mime::HTML, request.content_mime_type + assert_equal 'utf-8', request.content_charset end test "can override format with parameter" do