Skip to content

Commit

Permalink
return 206 for every ranged response - fixes misskey-dev#494
Browse files Browse the repository at this point in the history
  • Loading branch information
dakkar committed Apr 9, 2024
1 parent bb7b4a8 commit 92eec21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/backend/src/server/FileServerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ export class FileServerService {
reply.header('Content-Range', `bytes ${start}-${end}/${file.file.size}`);
reply.header('Accept-Ranges', 'bytes');
reply.header('Content-Length', chunksize);
reply.code(206);
} else {
image = {
data: fs.createReadStream(file.path),
Expand Down Expand Up @@ -431,6 +432,7 @@ export class FileServerService {
reply.header('Content-Range', `bytes ${start}-${end}/${file.file.size}`);
reply.header('Accept-Ranges', 'bytes');
reply.header('Content-Length', chunksize);
reply.code(206);
} else {
image = {
data: fs.createReadStream(file.path),
Expand Down

0 comments on commit 92eec21

Please sign in to comment.