[whatwg/fetch] Consider "extract a MIME type and compare its essence" (#856)

I think this is an operation that many standards could use. Given a _headerList_ and a _mimeTypeEssence_:

1. Let _mimeType_ be the result of extracting a MIME type.
2. If _mimeType_ is failure, then return failure.
3. If _mimeType_'s essence is not _mimeTypeEssence_, then return failure.
4. Return _mimeType_.

E.g., https://github.com/WICG/webpackage/pull/359 by @jyasskin identifies two callers (they don't need the returned MIME type either, but some callers will need it to inspect parameters).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/856

Received on Monday, 7 January 2019 10:14:06 UTC