Created
May 14, 2011 02:35
-
-
Save AquaGeek/971835 to your computer and use it in GitHub Desktop.
Rails Lighthouse ticket #6698
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment