From 620a5576525ac9eab70bcc00337a15aa2750716c Mon Sep 17 00:00:00 2001 From: Alexey Zimarev Date: Sun, 12 Mar 2023 17:04:26 +0100 Subject: [PATCH] Follow up fix of a compile error --- src/RestSharp/RestClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RestSharp/RestClient.cs b/src/RestSharp/RestClient.cs index 1dd953392..00f8b9353 100644 --- a/src/RestSharp/RestClient.cs +++ b/src/RestSharp/RestClient.cs @@ -210,7 +210,7 @@ public partial class RestClient : IRestClient { static void ConfigureHttpClient(HttpClient httpClient, RestClientOptions options) { if (options.MaxTimeout > 0) httpClient.Timeout = TimeSpan.FromMilliseconds(options.MaxTimeout); - if (options.UserAgent != null && httpClient.DefaultRequestHeaders.UserAgent.All(x => $"{x.Product?.Name}/{x.Product?.Version}" != Options.UserAgent)) { + if (options.UserAgent != null && httpClient.DefaultRequestHeaders.UserAgent.All(x => $"{x.Product?.Name}/{x.Product?.Version}" != options.UserAgent)) { httpClient.DefaultRequestHeaders.TryAddWithoutValidation(KnownHeaders.UserAgent, options.UserAgent); }