W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: [cors] Content-Type

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 20 Dec 2011 18:29:41 +0100
To: public-webapps@w3.org
Message-ID: <op.v6stjrtu64w2qv@annevk-macbookpro.local>
On Wed, 22 Jun 2011 14:44:44 +0200, Anne van Kesteren <annevk@opera.com>  
> 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
Received on Tuesday, 20 December 2011 17:30:13 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:37 UTC