mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Encoding could still be nil
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user