-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
User-Agent from HttpClient.DefaultRequestHeaders is not set properly in FlurlClient #778
Comments
Have you tried it with 4.0? It handles |
I've been using 4.0 for a verrrrry long time. So the problem is, I do not remember how Flurl managed Headers in 3.x. |
Ok, here is some code that shows this could be considered a regression in 4.0:
With 4.0:
With 3.2.4:
But maybe there is a workaround when using 4.0. |
Here is how I will workaround this issue for now:
But the issue is probably not specific to the User-Agent header. |
Thanks, I'll look into it ahead of the final release. So much to do...really hoped to ship 4.0 this week but not likely to happen. |
This is fixed in pre7 (if you didn't notice). I don't love the fix but MS doesn't make it easy. Thanks for providing the repro, it was perfect. |
Thank you Todd for the fix! Also, I've tested pre7, it works for me. |
User-Agent
fromHttpClient.DefaultRequestHeaders
is not set properly inFlurlClient
, whenUser-Agent
is composed of multipleProductInfo
.Example:
will output to console:
User-Agent: Mozilla/5.0
instead of
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:109.0) Gecko/20100101 Firefox/120.0
So, an important part of the
User-Agent
is lost.I guess the logic of headers initialization in
FlurlClient
constructor is incorrect.What do you think? Am I missing something?
The text was updated successfully, but these errors were encountered: