Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Trying to add user agent header.
  • Loading branch information
rokonec authored and github-actions committed Mar 18, 2025
commit 5ec9910b1f8b95fd197e5819881a2e5e4596f31a
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,11 @@ public async Task SendAsync_RequestVersion20_ResponseVersion20(Uri server)
var request = new HttpRequestMessage(HttpMethod.Get, server);
request.Version = new Version(2, 0);

request.Headers.TryAddWithoutValidation("User-Agent",
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) " +
"AppleWebKit/537.36 (KHTML, like Gecko) " +
"Chrome/90.0.4430.93 Safari/537.36");

using (HttpClient client = CreateHttpClient())
{
using (HttpResponseMessage response = await client.SendAsync(TestAsync, request))
Expand Down