return 206 for every ranged response - fixes #494

This commit is contained in:
dakkar 2024-04-09 15:42:29 +01:00
parent bb7b4a8ea4
commit 92eec2178f

View file

@ -192,6 +192,7 @@ export class FileServerService {
reply.header('Content-Range', `bytes ${start}-${end}/${file.file.size}`); reply.header('Content-Range', `bytes ${start}-${end}/${file.file.size}`);
reply.header('Accept-Ranges', 'bytes'); reply.header('Accept-Ranges', 'bytes');
reply.header('Content-Length', chunksize); reply.header('Content-Length', chunksize);
reply.code(206);
} else { } else {
image = { image = {
data: fs.createReadStream(file.path), data: fs.createReadStream(file.path),
@ -431,6 +432,7 @@ export class FileServerService {
reply.header('Content-Range', `bytes ${start}-${end}/${file.file.size}`); reply.header('Content-Range', `bytes ${start}-${end}/${file.file.size}`);
reply.header('Accept-Ranges', 'bytes'); reply.header('Accept-Ranges', 'bytes');
reply.header('Content-Length', chunksize); reply.header('Content-Length', chunksize);
reply.code(206);
} else { } else {
image = { image = {
data: fs.createReadStream(file.path), data: fs.createReadStream(file.path),