Project: duracloud
Issue DURACLOUD-401: Use application/xml as response Content-Type for XML-returning REST API methods
Most of the REST API methods that return XML today use text/xml, but application/xml is a actually a better choice due to character encoding issues: According to the specification of the text/* media types (RFC2046), if a charset parameter is not specified in the declaration of mime type (at the end of the Content-Type value, ala "text/xml; charset=utf-8", it must be assumed that the body is encoded in US-ASCII. The "encoding" declared in the XML declaration is supposed to be ignored. Here are a couple online posts that further explain the problem: * http://annevankesteren.nl/2005/03/text-xml * http://www.grauw.nl/blog/entry/489 It's clearly the intent that DuraCloud REST API methods that return XML are encoded in UTF-8 (because the xml declaration says so), but according to the standards, because text/xml is used instead of application/xml, and the Content-Type is not declared with a "charset=utf-8" MIME parameter, the xml declaration is supposed to be ignored by clients and they should assume US-ASCII.
Story points: 1