fix: don't set content-length twice
This commit is contained in:
parent
75ca8b14c6
commit
0da6c7525f
@ -57,11 +57,9 @@ export function setHeaders(
|
||||
});
|
||||
|
||||
if (range) {
|
||||
const length = range.end - range.start + 1;
|
||||
ctx.status(206);
|
||||
ctx.header('Content-Length', length.toString());
|
||||
ctx.header('Content-Range', `bytes ${range.start}-${range.end}/${size}`);
|
||||
} else {
|
||||
ctx.header('Content-Length', size.toString());
|
||||
ctx.status(200);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user