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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-01 15:10:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-01 15:10:14 +0300
commita27b8a5c104f492e4b0abac4c84385a615c4f6ba (patch)
tree3ec1a2cc06312b1999ce405905ab7881f68927d2 /lib/gitlab/lfs
parent635d82b15d83a88a2d073fbf3bb56f6ff626020f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/lfs')
-rw-r--r--lib/gitlab/lfs/client.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab/lfs/client.rb b/lib/gitlab/lfs/client.rb
index 01c18ab0bdd..95217f86d01 100644
--- a/lib/gitlab/lfs/client.rb
+++ b/lib/gitlab/lfs/client.rb
@@ -7,9 +7,11 @@ module Gitlab
# * https://github.com/git-lfs/git-lfs/blob/master/docs/api/basic-transfers.md
class Client
GIT_LFS_CONTENT_TYPE = 'application/vnd.git-lfs+json'
+ GIT_LFS_USER_AGENT = "GitLab #{Gitlab::VERSION} LFS client"
DEFAULT_HEADERS = {
'Accept' => GIT_LFS_CONTENT_TYPE,
- 'Content-Type' => GIT_LFS_CONTENT_TYPE
+ 'Content-Type' => GIT_LFS_CONTENT_TYPE,
+ 'User-Agent' => GIT_LFS_USER_AGENT
}.freeze
attr_reader :base_url
@@ -53,7 +55,8 @@ module Gitlab
body_stream: file,
headers: {
'Content-Length' => object.size.to_s,
- 'Content-Type' => 'application/octet-stream'
+ 'Content-Type' => 'application/octet-stream',
+ 'User-Agent' => GIT_LFS_USER_AGENT
}.merge(upload_action['header'] || {})
}