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

fix: set user-agent header case-insensitively for http adapter #3922

Conversation

ranjan-purbey
Copy link

FIxes #3844

When using http adapter, axios sets the user-agent header only if the header is named "User-Agent" or "user-agent". Otherwise it is over-written by the default user-agent string.

With this fix the goal is to preserve a custom user-agent when specified, irrespective of string case used for naming the header.

@caugner
Copy link
Contributor

caugner commented Oct 6, 2021

Could you please check if this isn't already resolved by #2880 in v0.22.0?

@ranjan-purbey
Copy link
Author

Yes, that fixes the issue. Thanks!

@ranjan-purbey ranjan-purbey deleted the bugfix/case-sensitive-user-agent branch March 6, 2022 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Axios doesn't see the User-agent header
2 participants