Bug 245757 - Add proper support for "Parsing Structured Fields" from RFC8941
Summary: Add proper support for "Parsing Structured Fields" from RFC8941
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://datatracker.ietf.org/doc/html...
Keywords: InRadar
Depends on: 245750
Blocks: 241952
  Show dependency treegraph
 
Reported: 2022-09-27 15:58 PDT by Chris Dumez
Modified: 2022-09-28 18:17 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2022-09-27 15:58:36 PDT
Add proper support for "Parsing Structured Fields" from RFC8941 for both "item" and "dictionary" types. The spec also supports the "list" type, but I didn't add it yet since we don't have any users yet.

The "item" type is used to parse the Cross-Origin-Opener-Policy & Cross-Origin-Embedder-Policy headers:
- https://html.spec.whatwg.org/multipage/origin.html#obtain-coop (step 3)
- https://html.spec.whatwg.org/multipage/origin.html#obtain-an-embedder-policy (step 3)

The "dictionary" type is used to parse the Reporting-Endpoints header:
- https://w3c.github.io/reporting/#process-header (step 2)

We had partial support in 2 different places with no code sharing. We know have near complete support with code sharing.

This will allow us to implement support for the Permission-Policy header more easily in the near future:
- https://www.w3.org/TR/permissions-policy-1/#algo-process-response-policy (step 1)
Comment 1 Chris Dumez 2022-09-27 16:27:12 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4775
Comment 2 EWS 2022-09-28 18:11:26 PDT
Committed 254983@main (96319c7e58ba): <https://commits.webkit.org/254983@main>

Reviewed commits have been landed. Closing PR #4775 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-09-28 18:12:42 PDT
<rdar://problem/100537297>