Skip to content

Commit 3a1035d

Browse files
YannicLucas Ripoche
authored and
Lucas Ripoche
committed
[remote/downloader] Migrate Downloader to take Credentials
Progress on bazelbuild#15856 Closes bazelbuild#16601. PiperOrigin-RevId: 485837451 Change-Id: I785882d0ff3e171dcaee6aa6f628bca9232c730a
1 parent 63e1fed commit 3a1035d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/DownloadManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ public Path download(
267267
try {
268268
downloader.download(
269269
rewrittenUrls,
270-
credentialFactory.create(rewrittenAuthHeaders),
270+
new StaticCredentials(rewrittenAuthHeaders),
271271
checksum,
272272
canonicalId,
273273
destination,
@@ -348,7 +348,7 @@ public byte[] downloadAndReadOneUrl(
348348
for (int attempt = 0; attempt <= retries; ++attempt) {
349349
try {
350350
return httpDownloader.downloadAndReadOneUrl(
351-
rewrittenUrls.get(0), credentialFactory.create(authHeaders), eventHandler, clientEnv);
351+
rewrittenUrls.get(0), new StaticCredentials(authHeaders), eventHandler, clientEnv);
352352
} catch (ContentLengthMismatchException e) {
353353
if (attempt == retries) {
354354
throw e;

0 commit comments

Comments
 (0)