Bug 256774 - Web Manifest: fetching should enforce mime type
Summary: Web Manifest: fetching should enforce mime type
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: Safari 16
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-05-14 19:57 PDT by Marcos Caceres
Modified: 2023-05-21 19:58 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos Caceres 2023-05-14 19:57:20 PDT
According to HTML, when a web manifest is fetched, it should enforce the "JSON MIME type" type:
https://html.spec.whatwg.org/#link-type-manifest

Specifically: 

> To process this type of linked resource given a link element el, boolean success, response response, and byte sequence bodyBytes:

>  If response's Content-Type metadata is not a JSON MIME type, then set success to false.

Where:
A JSON MIME type is any MIME type whose subtype ends in "+json" or whose essence is "application/json" or "text/json".
Comment 1 Radar WebKit Bug Importer 2023-05-21 19:58:20 PDT
<rdar://problem/109638803>