Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't set Content-Length in XMLHttpRequest fn (#554)
Setting the `Content-Length` request header in the context of an XMLHttpRequest leads to the error: ``` Refused to set unsafe header "Content-Length" ``` This header is considered a forbidden request header that can't be set with `setRequestHeader()`. I've confirmed that the initial implementation was unnecessary: #358 (comment). See the XMLHttpRequest specs: * [setRequestHeader() method](https://xhr.spec.whatwg.org/#the-setrequestheader()-method) * [Forbidden request header](https://fetch.spec.whatwg.org/#forbidden-request-header) [CR-6763](https://algolia.atlassian.net/browse/CR-6763) [CR-6763]: https://algolia.atlassian.net/browse/CR-6763?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
- Loading branch information