From 89aeded22638141b7357897aa8977f4ebc6dd8a6 Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Mon, 4 Apr 2022 15:35:29 +0300 Subject: [PATCH] Don't verify range values in range responses User-agents don't actually perform these verifications. The only important verification is origin of responses. See https://github.com/whatwg/html/pull/7655#discussion_r836069838 --- source | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/source b/source index 09cd03207be..e9ef1e2977c 100644 --- a/source +++ b/source @@ -2557,10 +2557,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • location URL
  • timing info
  • service worker timing info
  • -
  • - extract content-range values - -
  • @@ -34685,19 +34681,21 @@ interface MediaError {

    To verify a media response given a response - response, a media resource resource, and - "entire resource" or a - (number, number or "until end") tuple byteRange:

    + response, and a media resource resource:

    1. If response is a network error, then return false.

    2. -
    3. If byteRange is "entire resource", then return - true.

    4. -
    5. Let internalResponse be response's unsafe response.

    6. +
    7. +

      If internalResponse's status is + 200, then return true.

      + +

      Range headers may be ignored, returning the whole resource instead.

      +
    8. +
    9. If internalResponse's status is not 206, then return false.

    10. @@ -34733,14 +34731,6 @@ interface MediaError { by being patched together with other responses from different origins.

      -
    11. Let (start, end) be the result of - extracting content-range values from - internalResponse.

    12. - -
    13. If start is not byteRange[0], or if - byteRange[1] is neither "until end" or end, - return false.

    14. -
    15. Return true.

    @@ -34879,8 +34869,8 @@ interface MediaError {
  • If the result of verifying - response given the current media resource and - byteRange is false, then call finalize. Otherwise, + response given the current media resourceis false, then call + finalize. Otherwise, incrementally read response's body given updateMedia, processEndOfMedia, finalize, and global.