-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
Description
Migrated from sinonjs/sinon#607
Originally created by @terinjokes on Thu, 20 Nov 2014 00:47:58 GMT
FakeXMLHttpRequest's send
method currently clobbers the "Content-Type" header if set, by removing anything after the first ";" and forcibly appending ";charset=utf-8".
A real XHR object allows sending binary data via TypedArray
s, ArrayBuffer
s, and Blob
s. They also correctly form encode when sent with FormData
values. As "Content-Type" might have application-specific behavior, blindingly clobbering them makes it difficult for developers to properly test the functionality.
fatso83 and mroderick