diff options
author | Saito <saitowu@gmail.com> | 2012-11-10 01:06:20 +0800 |
---|---|---|
committer | Saito <saitowu@gmail.com> | 2012-11-10 01:06:20 +0800 |
commit | b664b784f16f5f0fca295af538483bb83c20f98f (patch) | |
tree | be4312a0b69e2acb5d979f1613af4ff542add552 | |
parent | 5b66e08ae539e24cc309b3ad8b85bc9e22ab41f5 (diff) | |
download | gitlab-ce-b664b784f16f5f0fca295af538483bb83c20f98f.tar.gz |
linguist and web browser will take care of mimetype and encoding problem.
-rw-r--r-- | app/controllers/blob_controller.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/controllers/blob_controller.rb b/app/controllers/blob_controller.rb index d68754d072a..d4a45d9508e 100644 --- a/app/controllers/blob_controller.rb +++ b/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 ) |