Open Bug 1733981 Opened 2 years ago Updated 2 months ago

CORS: Allow particular Range header values without a preflight

Categories

(Core :: DOM: Networking, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: jaffathecake, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-needed, Whiteboard: [necko-triaged])

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36

Expected results:

Spec discussion: https://github.com/whatwg/fetch/issues/1310
Spec PR: https://github.com/whatwg/fetch/pull/1312
Tests PR: https://github.com/web-platform-tests/wpt/pull/31058

Range was added as a safe-listed header as long as the value is in a particular format, which aligns with formats the browser uses when requesting media and resuming downloads.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: dev-doc-needed
Severity: -- → N/A
Priority: -- → P3
Whiteboard: [necko-triaged]
Blocks: fetch

The following information seems to have sped the development of a webkit patch along, so I will re-post it here:

CORS-safelisted request-header:
https://fetch.spec.whatwg.org/#cors-safelisted-request-header

Allowed particular Range header values (simple range header value):
https://fetch.spec.whatwg.org/#simple-range-header-value

Examples:

Range: bytes=0-255

Range: bytes=255-


Hopefully it will make a patch for Gecko more likely.

See Also: → 1465074

Dev docs published: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests

Range (only with a simple range header value; e.g., bytes=256- or bytes=127-255)
Note: Firefox has not implemented Range as a safelisted request-header yet. See bug 1733981.

Shipped in Chromium: https://chromestatus.com/feature/5652396366626816
In trunk for WebKit: https://git.webkit.org/?p=WebKit.git;a=commit;h=2b039d303782f915fd730720f281f081aab45549

You need to log in before you can comment on or make changes to this bug.