Permalink
Browse files

linguist and web browser will take care of mimetype and encoding prob…

…lem.
  • Loading branch information...
1 parent 5b66e08 commit b664b784f16f5f0fca295af538483bb83c20f98f @SaitoWu SaitoWu committed Nov 9, 2012
Showing with 1 addition and 8 deletions.
  1. +1 −8 app/controllers/blob_controller.rb
@@ -11,16 +11,9 @@ class BlobController < ProjectResourceController
def show
if @tree.is_blob?
- if @tree.text?
- encoding = detect_encoding(@tree.data)
- mime_type = encoding ? "text/plain; charset=#{encoding}" : "text/plain"
- else
- mime_type = @tree.mime_type
- end
-
send_data(
@tree.data,
- type: mime_type,
+ type: @tree.mime_type,
disposition: 'inline',
filename: @tree.name
)

0 comments on commit b664b78

Please sign in to comment.