Full partial content stream

This commit is contained in:
Filip Znachor 2022-02-24 16:12:19 +01:00
parent 7716332b1f
commit 1b12af714f

View file

@ -37,11 +37,10 @@ export class Webserver {
let [from, to] = this.from_to([range.from, range.from+this.chunk_size], d.total_size);
let contentLength = this.partial_size + 1;
if(contentLength+from > d.total_size) contentLength = d.total_size-from;
let contentLength = d.total_size-from;
let headers = {
"Content-Range": `bytes ${from}-${from+contentLength}/${d.total_size+1}`,
"Range": `bytes=${from}-${from+contentLength}/${d.total_size+1}`,
"Content-Range": `bytes ${from}-${d.total_size}/${d.total_size+1}`,
"Range": `bytes=${from}-${d.total_size}/${d.total_size+1}`,
"Accept-Ranges": "bytes",
"Content-Length": contentLength,
"Content-Type": "application/octet-stream",