Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Caseless header comparing in HTTP adapter. (#2880)
* 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>
- Loading branch information