[Webkit-unassigned] [Bug 180526] Update MIME type parser

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 27 01:58:01 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=180526

Frédéric Wang (:fredw) <fred.wang at free.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fred.wang at free.fr

--- Comment #2 from Frédéric Wang (:fredw) <fred.wang at free.fr> ---
Comment on attachment 348014
  --> https://bugs.webkit.org/attachment.cgi?id=348014
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=348014&action=review

> Source/WebCore/ChangeLog:8
> +        Require type and subtype tokens.

Is there more work to do? If not, I suspect we want to handle this patch in a separate bug (dependency of that one). I guess you want to import/update WPT tests too.

> Source/WebCore/platform/network/ParsedContentType.cpp:189
>      index = semiColonIndex + 1;

Can this be simplified a bit?

IIUC, after the previous changes you can save the contentTypeEnd index and call skipSpaces(contentType, index) again. Then you have three cases:

- index == contentTypeLength => receiver.setContentType(contentTypeStart, contentTypeEnd), return
- contentType[index++] != ';' => error, return
- otherwise receiver.setContentType(contentTypeStart, contentTypeEnd) and continue

I guess you mean to make use of the type/subtype tokens at some point (maybe add a FIXME).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180827/479a798e/attachment-0001.html>


More information about the webkit-unassigned mailing list