[whatwg/fetch] Define ABNF for `origin-or-null. (PR #1924)

The ABNF for `Access-Control-Allow-Origin` relies upon the `origin-or-null` syntax, which doesn't exist in RFC6454 (see https://www.rfc-editor.org/errata/eid3249). This patch defines the intended syntax.

This is intended to be an editorial change without any change in behavior, but adding grammar is somewhat normative? Idunno.

This patch also takes a normative dependency on RFC6454 for the `serialized-origin` grammar, which might not be ideal. We could copy it here if you'd prefer.

WDYT?


<!--
    This comment and the below content is programmatically generated.
    You may add a comma-separated list of anchors you'd like a
    direct link to below (e.g. #idl-serializers, #idl-sequence):

    Don't remove this comment or modify anything below this line.
    If you don't want a preview generated for this pull request,
    just replace the whole of this comment's content by "no preview"
    and remove what's below.
-->
***
<a href="https://whatpr.org/fetch/1924.html" title="Last updated on Apr 21, 2026, 7:46 AM UTC (ccb5f2f)">Preview</a> | <a href="https://whatpr.org/fetch/1924/dfdd250...ccb5f2f.html" title="Last updated on Apr 21, 2026, 7:46 AM UTC (ccb5f2f)">Diff</a>
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/fetch/pull/1924?email_source=notifications&email_token=ACLYVMLNDVITCFPT77HJWGT4W4RNBA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF4ZTKNRQGQ4DGMJYG2THEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVVYHEX3POBSW4X3DNRUWG2Y

-- Commit Summary --

  * Define ABNF for `origin-or-null.

-- File Changes --

    M fetch.bs (9)

-- Patch Links --

https://github.com/whatwg/fetch/pull/1924.patch?email_source=notifications&email_token=ACLYVMPAZLW4WPDXKMLWNRL4W4RNBA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF4ZTKNRQGQ4DGMJYG2THEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVZYHEX3QMF2GG2C7MNWGSY3Lhttps://github.com/whatwg/fetch/pull/1924.diff?email_source=notifications&email_token=ACLYVMMMKZ3IPVDPISRDD2L4W4RNBA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF4ZTKNRQGQ4DGMJYG2THEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVVYHEX3ENFTGMX3DNRUWG2Y
-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1924
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1924@github.com>

Received on Tuesday, 21 April 2026 07:46:28 UTC