Skip to content
Merged

v109 #1963

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
Prev Previous commit
Next Next commit
Merge branch 'dev' into v109
# Conflicts:
#	src/RestSharp/RestClient.cs
  • Loading branch information
alexeyzimarev committed Nov 20, 2022
commit 85be2f4ecdd6fc7419a7cbcd46e5a4376fb18168
4 changes: 2 additions & 2 deletions src/RestSharp/RestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ public RestClient(
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 != options.UserAgent)) {
httpClient.DefaultRequestHeaders.UserAgent.ParseAdd(options.UserAgent);
if (Options.UserAgent != null && httpClient.DefaultRequestHeaders.UserAgent.All(x => x.Product?.Name != Options.UserAgent)) {
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", Options.UserAgent);
}

if (options.Expect100Continue != null) httpClient.DefaultRequestHeaders.ExpectContinue = options.Expect100Continue;
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.