twendelmuth · GitHub

So regarding the Content-Type header that's going to be set:

This is done by HttpWebConnection.configureHttpProcessorBuilder() adding new RequestContent() - which then will take the StringEntity and take it's contentType. This seems to be close to what the living documentation of XMLHttpRequest is describing:

See: https://xhr.spec.whatwg.org/#the-send()-method 4.4 & 4.5

4.4.1 If author request headers contains `Content-Type`, then:
4.4.1 If body is a Document or a USVString, then:
4.4.1.1 Let originalAuthorContentType be the value of the header whose name is a byte-case-insensitive match for `Content-Type` in author request headers.
4.4.1.2 Let contentTypeRecord be the result of parsing originalAuthorContentType.
4.4.1.3 If contentTypeRecord is not failure, contentTypeRecord’s parameters["charset"] exists, and parameters["charset"] is not an ASCII case-insensitive match for "UTF-8", then:
4.4.1.3.1 Set contentTypeRecord’s parameters["charset"] to "UTF-8".
4.4.1.3.2 Let newContentTypeSerialized be the result of serializing contentTypeRecord.
4.4.1.3.3 Set `Content-Type`/newContentTypeSerialized in author request headers.
4.5. Otherwise:
4.5.1 If body is an HTML document, set `Content-Type`/`text/html;charset=UTF-8` in author request headers.
4.5.2 Otherwise, if body is an XML document, set `Content-Type`/`application/xml;charset=UTF-8` in author request headers.
4.5.3 Otherwise, if extractedContentType is not null, set `Content-Type`/extractedContentType in author request headers.

However testing this with Real Browser Chrome, FireFox & IE11 returns the results that the test has right now.
IE11 in Standard mode even refuses to acknowledge any Content-Type specified for the Blob and will always sent no Content-Type header from my tests.

So I'm uncertain how to move forward with this issue.

Read the original on github.com ↗