W3C home > Mailing lists > Public > public-webapi@w3.org > March 2007

[XHR] Default Content-Type

From: Alexey Proskuryakov <ap-carbon@rambler.ru>
Date: Sat, 17 Mar 2007 10:18:41 +0300
To: <public-webapi@w3.org>
Message-Id: <473742279.1174115921.172902184.4903@mcgi26.rambler.ru>


  Here is what the current XHR draft says about Content-Type of the 

> Scripts should specify the Content-Type header via setRequestHeader 
before invoking
> send() with an argument.

  Is invoking send() without an argument really a special case where 
scripts do not need to use setRequestHeader()? I'm pretty sure that many 
servers will look at Content-Type first, and reject a request if it's 
incorrect, even if there is no data.

> If the argument to send() is a Document and no Content-Type
> header has been set user agents must set it to application/xml for XML 
documents and
> to the most appropriate media type for other documents (using 
intrinsic knowledge about
> the document).

  What are the examples of how this intrinsic knowledge can be used? It 
is not clear how to achieve interoperability here without a precise list 
of cases. Also, what is the default Content-Type for string arguments?

  Firefox just defaults to "application/xml" for any data 
and so do nightly builds of WebKit.

- WBR, Alexey Proskuryakov.
Received on Saturday, 17 March 2007 07:18:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:23 UTC