mime
mime copied to clipboard
parsing quoted parameters conflicts with RFC 2045
https://github.com/hyperium/mime/blob/2e0268e6dc2933db308e452787c4ca85bc63bd6e/mime-parse/src/rfc7231.rs#L400
let mime = parse("text/plain; charset=\"utf-8\"").unwrap();
Parsing quoted parameters directly contradicts with RFC 2045:
Note that the value of a quoted string parameter does not include the
quotes. That is, the quotation marks in a quoted-string are not a
part of the value of the parameter, but are merely used to delimit
that parameter value. In addition, comments are allowed in
accordance with RFC 822 rules for structured header fields. Thus the
following two forms
Content-type: text/plain; charset=us-ascii (Plain text)
Content-type: text/plain; charset="us-ascii"
are completely equivalent.
Am I reading it incorrectly?