Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2016-02-01 13:33:22 +0300
committerJacob Vosmaer <contact@jacobvosmaer.nl>2016-02-01 13:33:22 +0300
commit02afa6793cca042f8563b0e26472606c743d76f5 (patch)
treec2242a77660c2f07fefe3b0879b17a4e743bee53 /app/controllers/projects/avatars_controller.rb
parent0197549d57bd32ee933ee775c625ed6fc5f5eec8 (diff)
Use only one header to send git blobs
Diffstat (limited to 'app/controllers/projects/avatars_controller.rb')
-rw-r--r--app/controllers/projects/avatars_controller.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/projects/avatars_controller.rb b/app/controllers/projects/avatars_controller.rb
index 0cd65ad5b16..eb501c3964c 100644
--- a/app/controllers/projects/avatars_controller.rb
+++ b/app/controllers/projects/avatars_controller.rb
@@ -6,8 +6,7 @@ class Projects::AvatarsController < Projects::ApplicationController
@blob = repository.blob_at_branch('master', @project.avatar_in_git)
if @blob
headers['X-Content-Type-Options'] = 'nosniff'
- headers['Gitlab-Workhorse-Repo-Path'] = repository.path_to_repo
- headers['Gitlab-Workhorse-Send-Blob'] = @blob.id
+ headers.store(*Gitlab::Workhorse.send_git_blob(repository, @blob))
headers['Content-Disposition'] = 'inline'
render nothing: true, content_type: @blob.content_type
else