Skip to content

Commit b0a300f

Browse files
JusterZhuclaude
andcommitted
fix: HttpDownloadExecutor now calls ApplyAuthAsync for download requests
Download requests were missing the global auth provider and ExtraHeaders (e.g. X-Tenant-Id) from HttpClientProvider, while version validation and status reporting already applied them. This caused tenant-scoped file downloads to fail when the server requires X-Tenant-Id header. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent c1ffe0f commit b0a300f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/c#/GeneralUpdate.Core/Download/Executors/HttpDownloadExecutor.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Threading;
66
using System.Threading.Tasks;
77
using GeneralUpdate.Core.Download.Abstractions;
8+
using GeneralUpdate.Core.Network;
89
using GeneralUpdate.Core.Download.Models;
910

1011
namespace GeneralUpdate.Core.Download.Executors;
@@ -119,6 +120,11 @@ public async Task<DownloadResult> ExecuteAsync(
119120
new System.Net.Http.Headers.AuthenticationHeaderValue(asset.AuthScheme, asset.AuthToken);
120121
}
121122

123+
// Apply global auth provider and extra headers (e.g. X-Tenant-Id) from HttpClientProvider.
124+
// This ensures download requests carry the same auth context as version validation
125+
// and status reporting requests.
126+
await HttpClientProvider.ApplyAuthAsync(request, token).ConfigureAwait(false);
127+
122128
using var cts = CancellationTokenSource.CreateLinkedTokenSource(token);
123129
cts.CancelAfter(_timeout);
124130

0 commit comments

Comments
 (0)