From 89aeded22638141b7357897aa8977f4ebc6dd8a6 Mon Sep 17 00:00:00 2001
From: Noam Rosenthal 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:
If response is a network error, then return false.
If byteRange is "entire resource
", then return
- true.
Let internalResponse be response's unsafe response.
If internalResponse's status is + 200, then return true.
+ +Range headers may be ignored, returning the whole resource instead.
+If internalResponse's status is not 206, then return false.
Let (start, end) be the result of - extracting content-range values from - internalResponse.
If start is not byteRange[0], or if
- byteRange[1] is neither "until end
" or end,
- return false.
Return true.
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.