Remove comment handling from media type parser |
||||||
Issue description
In particular the scanning for "(" in the media type parser.
Safari does not have this behavior and Edge does not have it for parameter values (and barely for media types). Let's remove it.
See https://github.com/whatwg/mimesniff/issues/33 for further analysis. (I'm planning to refine the media/MIME type parser in that standard to get browsers more closely aligned. Eventually there will be tests too, once I know what I think the details should be like. Feedback appreciated.)
,
Oct 6 2017
I can take this one. It would be nice to see what Firefox developers think about it before making a change though: https://bugzilla.mozilla.org/show_bug.cgi?id=1406337.
,
Jul 6
,
Jul 6
,
Sep 21
FWIW, I'm pretty sure Firefox is in support of this given that Firefox already implements the new generic MIME type parser and the bug mentioned above wasn't closed. All that's left is integrating the new generic MIME type parser throughout the code base.
,
Oct 5
-> mmenke for https://chromium-review.googlesource.com/c/chromium/src/+/1257443
,
Oct 5
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5518c1a563526f51674feb28bfedd527e1c94072 commit 5518c1a563526f51674feb28bfedd527e1c94072 Author: Matt Menke <mmenke@chromium.org> Date: Fri Oct 05 22:03:19 2018 Content-Type parser: Update to more closely match latest WHATWG spec. The latest spec can be found at https://mimesniff.spec.whatwg.org/ In particular, this CL makes the parser: * Trim whitespace within quotes. * Not ignore first "(" in a charset or anything after it. * Allow quoted empty strings. * Prefer values closed to the beginning of the string. This makes a number of previously failing WPT layout tests pass, though there still remain some deviations from the spec: * When there are multiple Content-Type lines, we use the last. * We don't restrict the characters we allow in Content-Type fields. * We trim whitespace before the first quote characters (The spec indicates that if there's a space after the "=", it's treated as a non-quoted string). Bug: 788491 , 772343 Change-Id: Ieeb11eb76d824a9df5130d8c5dc0be3b442ca366 Reviewed-on: https://chromium-review.googlesource.com/c/1257443 Commit-Queue: Matt Menke <mmenke@chromium.org> Reviewed-by: Asanka Herath <asanka@chromium.org> Cr-Commit-Position: refs/heads/master@{#597331} [modify] https://crrev.com/5518c1a563526f51674feb28bfedd527e1c94072/net/http/http_response_headers_unittest.cc [modify] https://crrev.com/5518c1a563526f51674feb28bfedd527e1c94072/net/http/http_util.cc [modify] https://crrev.com/5518c1a563526f51674feb28bfedd527e1c94072/net/http/http_util_unittest.cc [modify] https://crrev.com/5518c1a563526f51674feb28bfedd527e1c94072/third_party/WebKit/LayoutTests/external/wpt/mimesniff/mime-types/charset-parameter.window-expected.txt
,
Oct 11
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by mmenke@chromium.org
, Oct 6 2017Components: -Internals>Network Internals>Network>HTTP