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

Create a new pull request by comparing changes #103

Merged
merged 1 commit into from Sep 8, 2021

Conversation

GulajavaMinistudio
Copy link

  • Caseless header comparing in HTTP adapter.

It was adding User-Agent and removing Authorization, but only when
existing headers had the exact right casing. Node uses caseless logic
when managing headers.

This was causing some requests to have User-Agent appended to the
headers object and overriding provided agent strings.

Also included is an update to not override the Content-Length if it
was already defined in the options. It can be desirable to manually
specify a content length that does not match the data on hand.
Especially for testing.

  • Fix eslint error

  • fixup: update state UA logic

Play nice with axios#3703

Co-authored-by: Jay jasonsaayman@gmail.com

Instructions

Please read and follow the instructions before creating and submitting a pull request:

  • Create an issue explaining the feature. It could save you some effort in case we don't consider it should be included in axios.
  • If you're fixing a bug, try to commit the failing test/s and the code fixing it in different commits.
  • Ensure you're following our contributing guide.

⚠️👆 Delete the instructions before submitting the pull request 👆⚠️

Describe your pull request here.

* Caseless header comparing in HTTP adapter.

It was adding User-Agent and removing Authorization, but only when
existing headers had the exact right casing. Node uses caseless logic
when managing headers.

This was causing some requests to have `User-Agent` appended to the
headers object and overriding provided agent strings.

Also included is an update to not override the `Content-Length` if it
was already defined in the options. It can be desirable to manually
specify a content length that does not match the data on hand.
Especially for testing.

* Fix eslint error

* fixup: update state UA logic

Play nice with #3703

Co-authored-by: Jay <jasonsaayman@gmail.com>
@GulajavaMinistudio GulajavaMinistudio merged commit e9d2465 into javascript-indonesias:master Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants