Showing content from https://greenbytes.de/tech/webdav/rfc6657.xml below:
RFC 2046 specified that the default "charset" parameter (i.e., the value used when the parameter is not specified) is "US-ASCII" ( ). RFC 2616 changed the default for use by HTTP (Hypertext Transfer Protocol) to be "ISO-8859-1" ( ). This encoding is not very common for new "text/*" media types and a special rule in the HTTP specification adds confusion about which specification ( or ) is authoritative in regards to the default charset for "text/*" media types. Many complex text subtypes such as "text/html" and "text/xml" have internal (to their format) means of describing the charset. Many existing User Agents ignore the default of "US-ASCII" rule for at least "text/html" and "text/xml". This document changes RFC 2046 rules regarding default "charset" parameter values for "text/*" media types to better align with common usage by existing clients and servers. It does not change the defaults for any currently registered media type. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in . says: The default character set, which must be assumed in the absence of a charset parameter, is US-ASCII. As explained in the Introduction section, this rule is considered outdated, so this document replaces it with the following set of rules: Each subtype of the "text" media type that uses the "charset" parameter can define its own default value for the "charset" parameter, including the absence of any default. In order to improve interoperability with deployed agents, "text/*" media type registrations &SHOULD; either specify that the "charset" parameter is not used for the defined subtype, because the charset information is transported inside the payload (such as in "text/xml"), or require explicit unconditional inclusion of the "charset" parameter, eliminating the need for a default value. In accordance with option (a) above, registrations for "text/*" media types that can transport charset information inside the corresponding payloads (such as "text/html" and "text/xml") &SHOULD-NOT; specify the use of a "charset" parameter, nor any default value, in order to avoid conflicting interpretations should the "charset" parameter value and the value specified in the payload disagree. Thus, new subtypes of the "text" media type &SHOULD-NOT; define a default "charset" value. If there is a strong reason to do so despite this advice, they &SHOULD; use the "UTF-8" charset as the default. Regardless of what approach is chosen, all new "text/*" registrations &MUST; clearly specify how the charset is determined; relying on the default defined in is no longer permitted. However, existing "text/*" registrations that fail to specify how the charset is determined still default to US-ASCII. Specifications covering the "charset" parameter, and what default value, if any, is used, are subtype-specific, NOT protocol-specific. Protocols that use MIME, therefore, &MUST-NOT; override default charset values for "text/*" media types to be different for their specific protocol. The protocol definitions &MUST; leave that to the subtype definitions. The default "charset" parameter value for "text/plain" is unchanged from and remains as "US-ASCII". Guessing of the "charset" parameter can lead to security issues such as content buffer overflows, denial of services, or bypass of filtering mechanisms. However, this document does not promote guessing, but encourages use of charset information that is specified by the sender. Conflicting information in-band vs. out-of-band can also lead to similar security problems, and this document recommends the use of charset information that is more likely to be correct (for example, in-band over out-of-band). IANA has updated the "text" subregistry of the Media Types registry ( ) to add the following preamble: "See [RFC6657] for information about 'charset' parameter handling for text media types." Also, IANA has added this RFC to the list of references at the beginning of the Application for Media Type ( ).
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4