Skip to content

Commit e5d95f5

Browse files
yashdsarafclaude
andcommitted
Add User-Agent header to binary download via WebClient
Matches what Node SDK already does on every HTTP request (rails endpoint POST AND CDN binary GET). Until this commit, the WebClient binary download was the only request without a UA header, which made CloudFront/CloudFlare access logs unfilterable by binding+version. Now every outbound HTTP from this binding sends: User-Agent: browserstack-local-csharp/<version> Same value the HttpClient already sent on the rails endpoint POST. Follow-up to the code review pass on LOC-6563. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1bade9b commit e5d95f5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

BrowserStackLocal/BrowserStackLocal/BrowserStackTunnel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ public void downloadBinary()
242242

243243
using (var client = new WebClient())
244244
{
245+
client.Headers.Add(HttpRequestHeader.UserAgent, userAgent);
245246
if (!string.IsNullOrEmpty(proxyHost) && proxyPort > 0)
246247
{
247248
client.Proxy = new WebProxy(proxyHost, proxyPort);

0 commit comments

Comments
 (0)