Re: [cors] Content-Type

On Wed, 22 Jun 2011 14:44:44 +0200, Anne van Kesteren <annevk@opera.com>  
wrote:
> There is one other problem noted by sicking on the WHATWG list. Namely  
> that Content-Type can also be set by the user agent. E.g. based on the  
> File object passed to the send() method in XMLHttpRequest. So I think I  
> will update the places where CORS compares "author request headers" (I  
> renamed "custom request headers" as "author" is clearer and "custom"  
> caused confusion) against "simple headers" to also compare the  
> Content-Type header (if set by the user agent) against "simple headers".

Just to follow up on this (again) in case anyone missed it. This was  
solved by changing XMLHttpRequest's send() method to append Content-Type  
to "author request headers" (if not there already) based on  
File/DOMString/etc., rather than set Content-Type directly outside of the  
context of "author request headers". Any API interacting with CORS with a  
request Content-Type header will have to include it in its "author request  
headers" as well.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Tuesday, 20 December 2011 17:30:13 UTC