RFC Errata


Errata Search

 
Source of RFC  
Summary Table Full Records

RFC 7231, "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", June 2014

Source of RFC: httpbis (app)

Errata ID: 6149
Status: Reported
Type: Technical
Publication Format(s) : TEXT

Reported By: Alan Egerton
Date Reported: 2020-04-29

Section 5.3.2 says:

The media type quality factor associated with a given type is
determined by finding the media range with the highest precedence
that matches the type.  For example,

  Accept: text/*;q=0.3, text/html;q=0.7, text/html;level=1,
          text/html;level=2;q=0.4, */*;q=0.5

would cause the following values to be associated:

+-------------------+---------------+
| Media Type        | Quality Value |
+-------------------+---------------+
| text/html;level=1 | 1             |
| text/html         | 0.7           |
| text/plain        | 0.3           |
| image/jpeg        | 0.5           |
| text/html;level=2 | 0.4           |
| text/html;level=3 | 0.7           |
+-------------------+---------------+

It should say:

The media type quality factor associated with a given type is
determined by finding the media range with the highest precedence
that matches the type.  For example,

  Accept: text/*;q=0.3, text/plain;q=0.7, text/plain;format=flowed,
          text/plain;format=fixed;q=0.4, */*;q=0.5

would cause the following values to be associated:

+--------------------------+---------------+
| Media Type               | Quality Value |
+--------------------------+---------------+
| text/plain;format=flowed | 1             |
| text/plain               | 0.7           |
| text/html                | 0.3           |
| image/jpeg               | 0.5           |
| text/plain;format=fixed  | 0.4           |
| text/plain;delsp=yes     | 0.7           |
+--------------------------+---------------+

Notes:

The optional "level" parameter of media type text/html was removed by informational RFC 2854 (The 'text/html' Media Type), [section 2](https://tools.ietf.org/html/rfc2854#section-2) of which states:

> Note that [HTML20] included an optional "level" parameter; in
> practice, this parameter was never used and has been removed from
> this specification.

More formally, [the current IANA registration of the text/html media type](https://www.iana.org/assignments/media-types/text/html), which is taken directly from [section 16.1 of the HTML specification](https://html.spec.whatwg.org/multipage/iana.html#text/html), does not include a "level" parameter.

Whilst the example is non-normative, it has given rise to misleading information—e.g. in the [MDN Web Docs glossary definition of "quality values"](https://developer.mozilla.org/en-US/docs/Glossary/quality_values), which states:

> Some syntax, like the one of Accept, allow additional specifiers
> like text/html;level=1. These increase the specificity of the value.
> Their use is extremely rare.

Report New Errata