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:
authorNick Thomas <nick@gitlab.com>2019-04-11 17:29:08 +0300
committerNick Thomas <nick@gitlab.com>2019-04-16 17:16:23 +0300
commit670b2c1af55ab5e993f3a3b05a1078e394f9ceda (patch)
tree881907dee2f8af2bf6989a1d40923d1febf049fc /spec/lib/gitlab/workhorse_spec.rb
parent2845e8d9736b82c89ef33a3dd24caa4f9816b0e6 (diff)
JSON-encoded binary fields should use Base64::encode64
It is not interoperable to use Base64::urlsafe_encode64 for fields in JSON that contain binary (as opposed to UTF8-safe) data. For instance, the Golang JSON decoder (which is what gitlab-workhorse uses) insists upon the standard base64 encoding.
Diffstat (limited to 'spec/lib/gitlab/workhorse_spec.rb')
-rw-r--r--spec/lib/gitlab/workhorse_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/lib/gitlab/workhorse_spec.rb b/spec/lib/gitlab/workhorse_spec.rb
index f8ce399287a..6f591ffaab0 100644
--- a/spec/lib/gitlab/workhorse_spec.rb
+++ b/spec/lib/gitlab/workhorse_spec.rb
@@ -39,7 +39,7 @@ describe Gitlab::Workhorse do
token: Gitlab::GitalyClient.token(project.repository_storage)
},
'ArchivePath' => metadata['ArchivePath'],
- 'GetArchiveRequest' => Base64.urlsafe_encode64(
+ 'GetArchiveRequest' => Base64.encode64(
Gitaly::GetArchiveRequest.new(
repository: repository.gitaly_repository,
commit_id: metadata['CommitId'],