diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-02-01 12:01:13 +0100 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-02-01 12:01:13 +0100 |
commit | b2a634c352ab23ed1180b7678b5c83db0137c0f7 (patch) | |
tree | 8dafc3bfda0d325ce5bfd7292870e54be904320f | |
parent | 2679ec40667958aa01c8480978b13a5727cac231 (diff) | |
download | gitlab-ce-b2a634c352ab23ed1180b7678b5c83db0137c0f7.tar.gz |
Avoid trailing 'charset=' garbage
-rw-r--r-- | app/controllers/projects/avatars_controller.rb | 3 | ||||
-rw-r--r-- | app/controllers/projects/raw_controller.rb | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/projects/avatars_controller.rb b/app/controllers/projects/avatars_controller.rb index eb501c3964c..bc40e601030 100644 --- a/app/controllers/projects/avatars_controller.rb +++ b/app/controllers/projects/avatars_controller.rb @@ -8,7 +8,8 @@ class Projects::AvatarsController < Projects::ApplicationController headers['X-Content-Type-Options'] = 'nosniff' headers.store(*Gitlab::Workhorse.send_git_blob(repository, @blob)) headers['Content-Disposition'] = 'inline' - render nothing: true, content_type: @blob.content_type + headers['Content-Type'] = @blob.content_type + head :ok # 'render nothing: true' messes up the Content-Type else render_404 end diff --git a/app/controllers/projects/raw_controller.rb b/app/controllers/projects/raw_controller.rb index 2ab8a6b83bb..87b4d08da0e 100644 --- a/app/controllers/projects/raw_controller.rb +++ b/app/controllers/projects/raw_controller.rb @@ -17,7 +17,8 @@ class Projects::RawController < Projects::ApplicationController else headers.store(*Gitlab::Workhorse.send_git_blob(@repository, @blob)) headers['Content-Disposition'] = 'inline' - render nothing: true, content_type: get_blob_type + headers['Content-Type'] = get_blob_type + head :ok # 'render nothing: true' messes up the Content-Type end else render_404 |