You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Setting useragent to null no longer works in 108.0.1 #1905
Describe the bug
Setting useragent to null now causes an exception = > The format of value ' ' is invalid
To Reproduce
Old code that worked (no useragent sent in headers)
var client = new RestClient("https://www.example.com.au");
client.UserAgent = null;
New code that fails
var client = new RestClient(new RestClientOptions { BaseUrl = new Uri("https://www.example.com.au"), UserAgent = null });
Stack trace
The format of value ' ' is invalid. Stack at System.Net.Http.Headers.HttpHeaderParser.ParseValue(String value, Object storeValue, Int32& index) at System.Net.Http.Headers.HttpHeaders.ParseAndAddValue(HeaderDescriptor descriptor, HeaderStoreItemInfo info, String value) at System.Net.Http.Headers.HttpHeaders.Add(HeaderDescriptor descriptor, String value) at System.Net.Http.Headers.HttpHeaderValueCollection`1.ParseAdd(String input) at RestSharp.RestClient.ConfigureHttpClient(HttpClient httpClient) at RestSharp.RestCl
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
alexeyzimarev commentedon Sep 20, 2022
Maybe you can submit a PR where you check the property value for
nulland not assign anything.stale commentedon Oct 30, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
repo-ranger commentedon Oct 30, 2022
stale commentedon Jan 7, 2023
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
repo-ranger commentedon Jan 7, 2023