jhiesey / stream-http

Streaming node http in the browser
MIT License
354 stars 62 forks source link

Fixed - IE 10/11 will add 'undefined' body for HTTP DELETE #67

Closed XiaoningLiu closed 7 years ago

XiaoningLiu commented 7 years ago

Fixes an issue where would call XMLHttpRequest.send(undefined), causing an issue in Internet Explorer 10 and 11. In these browsers, XMLHttpRequest.send(undefined) will cause a request body of "undefined" to be sent by the browser (e.g. on a DELETE). This causes the XMLHttpRequest to assume a request body of type text/plain (as Content-Type), which confuses some server software (Such as Azure Storage Server Authorization Error).

There also are same IE issues for other projects, including angular.js.

jhiesey commented 7 years ago

I addad a test and a much simpler fix in https://github.com/jhiesey/stream-http/commit/8df10e0d653942ed4ecf899b2cbd0685dc8cf807

jhiesey commented 7 years ago

Fix published in v2.6.2

XiaoningLiu commented 7 years ago

Thanks!