Hi Benjamin, you control the requested content type using #setRequestHeader in io.remote or the requestHeader property in io.request. For POST requests, by default, the content type is set to "application/x-www-form-urlencoded" (without the charset).
I'm not sure if appending the charset is really required. In your application, what kind of problems do you observe? Am 11.07.2011 um 17:53 schrieb Benjamin Dreux: > I made a further research. > Apparently with firefox, the content-type of the request include the > charset. (like application/x-www-form-urlencoded; charset=UTF-8 ) > But when using chrome the content-type does not contain a charset > (exemple application/x-www-form-urlencoded) > > Is there a way to add the charset in the request, I mean does the > qooxdoo team can make this so the request will have the same behavior > with chrome and firefox. > > 2011/7/8 Tristan Koch <[email protected]>: >> Hi Benjamin, >> >>> As long as i know qooxdoo is entirely in UTF-8 >>> I'm wondering why when sending a qx.remote.request >>> The used charset is set to ISO-8859-1,utf-8;q=0.7,*;q=0.7 >> >> In your example, you were using the Script transport. It's not possible to >> set any request headers with this transport method. Still, even with XHR its >> not possible to customize the header. To bring some light into this, let me >> quote from the XMLHttpRequest2 spec: >> >> „The above headers [including Accept-Charset] are controlled by the user >> agent to let it control those aspects of transport. This guarantees data >> integrity to some extent.“ >> >> (http://www.w3.org/TR/XMLHttpRequest2/, 3.6.2. The setRequestHeader() method) >> >> In other words, you cannot set the Accept-Charset from code. >> >>> It seem weird to me. >>> According to the fact that qooxdoo is fully utf8, the request should be >>> utf-8, and ask for utf-8 too. >> >> If I interpret the Accept-Charset header correctly, the browser does in fact >> request UTF-8 with the same priority as ISO. I guess servers that have UTF-8 >> available will therefore usually respond with UTF-8. Moreover, I believe the >> charset header requested is not mandatory for the HTTP server. >> >> Here is an example with curl (a command line http client) >> >> # Prefer ISO-8859-1… >> $ curl -v -I http://www.google.com -H "Accept-Charset: ISO-8859-1,q=0.7" >>> … >>> Accept: */* >>> Accept-Charset: ISO-8859-1,q=0.7 >>> … >> # … but response is UTF-8 >> < HTTP/1.1 302 Found >> < Content-Type: text/html; charset=UTF-8 >> >> (> precedes the request headers, < the response headers) >> >>> Maybe the reason for this is to fully support the http standard, which says >>> that without charset definition, the default should be latin 1?? >> >> Perhaps, including Latin-1 at the beginning of the String is some kind of >> workaround to ensure backwards compatibility? >> >> Regards >> Tristan >> ------------------------------------------------------------------------------ >> All of the data generated in your IT infrastructure is seriously valuable. >> Why? It contains a definitive record of application performance, security >> threats, fraudulent activity, and more. Splunk takes this data and makes >> sense of it. IT sense. And common sense. >> http://p.sf.net/sfu/splunk-d2d-c2 >> _______________________________________________ >> qooxdoo-devel mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel >> > > > > -- > Benjamin Dreux > Analyste-Programmeur > Chaire de logiciel libre-Finance Social et solidaire > UQAM > Montréal > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
