whatwg/mimesniff

MIME parsing step for discarding code points after " is unclear

Aperta

#64 aperta il 10 apr 2018

 (1 commento) (0 reazioni) (0 assegnatari)HTML (48 fork)github user discovery
clarificationgood first issuetopic: mime type

Metriche repository

Star
 (121 stelle)
Metriche merge PR
 (Merge medio 5m) (1 PR mergiata in 30 g)

Descrizione

In https://mimesniff.spec.whatwg.org/#parsing-a-mime-type the following step might be clearer if it explicitly said the trailing sequence after " was to be discarded. Might also be better if the example contains a ';' since the step mentions ';'

Current:

Collect a sequence of code points that are not U+003B (;) from input, given position. Example: Given text/html;charset="shift_jis"iso-2022-jp you end up with text/html;charset=shift_jis.

Suggested:

Collect a sequence of code points that are not U+003B (;) from input, given position and discard the result. Example 1: Given text/html;charset="shift_jis"iso-2022-jp you end up with text/html;charset=shift_jis. Example 2: Given text/csv;charset="utf-8" discarded ;header=present you end up with text/csv;charset=utf-8;header= present.

Guida contributor