Skip single-byte buffer when reading through UrlSource for range request

This commit is contained in:
Pablo Bonilla
2025-08-13 18:22:59 -06:00
parent c2292c8304
commit 5c598e35c2
+2
View File
@@ -314,8 +314,10 @@ export class UrlSource extends Source {
} else if (rangeResponse.status === 200) { } else if (rangeResponse.status === 200) {
// The server just returned the whole thing // The server just returned the whole thing
this._fullData = await rangeResponse.arrayBuffer(); this._fullData = await rangeResponse.arrayBuffer();
if (this._fullData.byteLength !== 1) {
return this._fullData.byteLength; return this._fullData.byteLength;
} }
}
// If the range request didn't provide the size, make a full GET request // If the range request didn't provide the size, make a full GET request
const { response } = await this._makeRequest(); const { response } = await this._makeRequest();