mirror of
https://github.com/diced/zipline.git
synced 2025-04-11 23:31:17 -05:00
fix: should fix ranged requests?
This commit is contained in:
parent
eb71c2bb54
commit
b5f09673ac
1 changed files with 2 additions and 1 deletions
|
@ -26,7 +26,7 @@ function rawFileDecorator(fastify: FastifyInstance, _, done) {
|
|||
.send();
|
||||
if (rangeEnd === Infinity) rangeEnd = size - 1;
|
||||
|
||||
const data = await this.server.datasource.get(id, rangeStart, rangeEnd);
|
||||
const data = await this.server.datasource.get(id, rangeStart, rangeEnd + 1);
|
||||
|
||||
// only send content-range if the client asked for it
|
||||
if (this.request.headers.range) {
|
||||
|
@ -46,6 +46,7 @@ function rawFileDecorator(fastify: FastifyInstance, _, done) {
|
|||
)
|
||||
if (size > this.server.config.core.compression.threshold && mimetype.match(/^(image|video|text)/))
|
||||
return this.send(useCompress.call(this, data));
|
||||
|
||||
return this.send(data);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue