Encoding could still be nil

This commit is contained in:
Joshua Peek
2011-09-27 10:18:44 -05:00
parent 0175681a4a
commit 84df2aaa0a

View File

@@ -53,7 +53,9 @@ module Linguist
# #
# Returns a content type String. # Returns a content type String.
def content_type def content_type
@content_type ||= binary? ? mime_type : "text/plain; charset=#{encoding.downcase}" @content_type ||= binary? ?
mime_type :
(encoding ? "text/plain; charset=#{encoding.downcase}" : "text/plain")
end end
# Public: Get the Content-Disposition header value # Public: Get the Content-Disposition header value