You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Tobia Conforto <to...@linux.it> on 2007/07/10 17:32:40 UTC

Content-Type charset parameter and application/ types

Hello

According to tests I've done and to a piece of documentation, it would
seem that a "charset=" parameter is added to the Content-Type header
only when the mime type starts with text/.

In fact http://cocoon.apache.org/2.1/userdocs/xml-serializer.html says:

	The charset parameter should not be specified explicitly;
	instead, when the top-level media type is text, a charset
	parameter should be added according to the character encoding
	actually used by the output method.

But this should also happen for application/xml, application/xhtml+xml,
and possibly other types.  RFC 3236 says:

	application/xhtml+xml

	The charset parameter has identical semantics to the charset
	parameter of the "application/xml" media type

and RFC 3023 says:

	application/xml

	Although listed as an optional parameter, the use of the charset
	parameter is STRONGLY RECOMMENDED, since [whatever]

Is this the serializer's fault?
The servlet container's fault?


Tobia