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

[XHR] send doesn’t explain what to do when method is GET

From: Laurens Holst <lholst@students.cs.uu.nl>
Date: Fri, 07 Dec 2007 15:15:10 +0100
Message-ID: <4759556E.5050506@students.cs.uu.nl>
To: public-webapi@w3.org
Hi,

The send method on the XMLHttpRequest object doesn’t explain what to do 
when the XMLHttpRequest object has been opened with the GET method, and 
data is passed to the send method.

I can see several scenarios:

1. Error is thrown.
2. Data is appended to GET query string. Note that the GET string has 
special encoding requirements that e.g. the 
application/x-www-form-urlencoded encoding deals with but e.g. 
application/xml not, how to deal with this.
3. Method is changed to POST (I don’t like this).

Also, what to do when the data is of type Document? In case of scenario 
2, the spec should make clear that no Content-Type has to be set.

On a further note, for data of type Document, the spec says:

"If no Content-Type header is in the list of request headers append a 
Content-Type header to the list of request headers with a value of 
application/xml."

Although this is sane behaviour, all browsers except for Opera do not 
check for an existing Content-Type, and just override it with text/xml 
or application/xml. Just wanted to let you know. Personally, I still 
prefer that browsers adjust their behaviour to what is specified.


~Grauw

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laurens Holst, student, university of Utrecht, the Netherlands.
Website: www.grauw.nl. Backbase employee; www.backbase.com.




Received on Friday, 7 December 2007 14:15:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:59 GMT