Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When add header "User-Agent" with whitespace value, split headers into 2 #2272

Open
astarte19 opened this issue Nov 15, 2024 · 0 comments
Open
Labels

Comments

@astarte19
Copy link

Bug description
When I do a RestRequest creation and add a User-Agent header with spaces, it results in a request being sent with 2 User-Agent headers

Reproduce

return new RestRequest(resource, method)
        .AddHeader(HeaderNames.UserAgent, "Product/Version Foo.Bar");

This request sends the following headers:
User-Agent: Product/Version
User-Agent: Foo.Bar

Expected behavior
I expected one header with a value "Product/Version Foo.Bar" to be added

Desktop

  • OS: Windows 11
  • .NET version .NET 6
  • Version 108.0.1, but in 112.1.0 same
@astarte19 astarte19 added the bug label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant