Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Sec-Fetch-Dest: json for JSON Modules #87

Closed
petamoriken opened this issue Oct 30, 2023 · 4 comments · Fixed by #88
Closed

Add Sec-Fetch-Dest: json for JSON Modules #87

petamoriken opened this issue Oct 30, 2023 · 4 comments · Fixed by #88
Assignees

Comments

@petamoriken
Copy link

petamoriken commented Oct 30, 2023

A request has an associated destination, which is the empty string, "audio", "audioworklet", "document", "embed", "font", "frame", "iframe", "image", "json", "manifest", "object", "paintworklet", "report", "script", "serviceworker", "sharedworker", "style", "track", "video", "webidentity", "worker", or "xslt". Unless stated otherwise it is the empty string.

FYI: whatwg/html#9486, whatwg/fetch#1691

@annevk
Copy link
Member

annevk commented Oct 30, 2023

Maybe we should merge this specification into Fetch after all. It's not great if each time we update Fetch we also have to update this.

@miketaylr
Copy link
Member

Yes, would be nice to maintain this in just one place (or two?).

@mikewest
Copy link
Member

The simplest thing to do seems to be decouple the explicit lists of valid header values by pointing to the relevant lists in Fetch. That is, something like the following for Sec-Fetch-Dest:

-Valid Sec-Fetch-Dest values include "audio", "audioworklet", "document", "embed", "empty", "font", "frame", "iframe", "image", "manifest", "object", "paintworklet", "report", "script", "serviceworker", "sharedworker", "style", "track", "video", "worker", "xslt".
+Valid Sec-Fetch-Dest values include the set of valid [=request=] [=request/destinations=] maintained in [[Fetch]].

That said, if someone would like to do the work to merge the documents, I don't have any problem with consolidation.

@miketaylr
Copy link
Member

The simplest thing to do seems to be decouple the explicit lists of valid header values by pointing to the relevant lists in Fetch. That is, something like the following for Sec-Fetch-Dest:

Good point, let me send in a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants