Skip to content

Commit c17d832

Browse files
committed
don't send range header in head request
1 parent 3bd38c8 commit c17d832

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lazyFile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ export class LazyUint8Array {
166166
const url = this.rangeMapper(0, 0).url;
167167
// can't set Accept-Encoding header :( https://stackoverflow.com/questions/41701849/cannot-modify-accept-encoding-with-fetch
168168
xhr.open("HEAD", url, false);
169-
// maybe this will help it not use compression?
170-
xhr.setRequestHeader("Range", "bytes=" + 0 + "-" + this._chunkSize);
169+
// // maybe this will help it not use compression?
170+
// xhr.setRequestHeader("Range", "bytes=" + 0 + "-" + 1e12);
171171
xhr.send(null);
172172
if (!((xhr.status >= 200 && xhr.status < 300) || xhr.status === 304))
173173
throw new Error("Couldn't load " + url + ". Status: " + xhr.status);

0 commit comments

Comments
 (0)