Set content-type to text/plain for all non binary files

This commit is contained in:
Joshua Peek
2011-06-03 11:21:16 -05:00
parent 40efc2bd44
commit 734cc29391
6 changed files with 13 additions and 128 deletions

View File

@@ -107,7 +107,7 @@ module Linguist
#
# Returns a content type String.
def content_type
@content_type ||= Mime.content_type_for(extname)
@content_type ||= binary? ? mime_type : 'text/plain'
end
# Public: Is the path binary?