This commit is contained in:
Tobe O 2019-01-27 19:30:40 -05:00
parent c7edb44085
commit 42779a85e4
4 changed files with 6 additions and 3 deletions

View file

@ -1,3 +1,6 @@
# 2.1.2+1
* Fix a typo that prevented `Range` requests from working.
# 2.1.2
* Patch support for range+streaming in Caching server.

View file

@ -158,7 +158,7 @@ class CachingVirtualDirectory extends VirtualDirectory {
}
setCachedHeaders(stat.modified, req, res);
return res.streamFile(file).then((_) => false);
return super.serveFile(file, stat, req, res);
});
}
}

View file

@ -240,7 +240,7 @@ class VirtualDirectory {
res.contentType = new MediaType.parse(type);
if (useBuffer == true) res.useBuffer();
if (req.headers.value('range')?.startsWith('bytes ') != true) {
if (req.headers.value('range')?.startsWith('bytes=') != true) {
await res.streamFile(file);
} else {
var header = new RangeHeader.parse(req.headers.value('range'));

View file

@ -4,7 +4,7 @@ environment:
sdk: ">=1.8.0 <3.0.0"
homepage: https://github.com/angel-dart/static
author: Tobe O <thosakwe@gmail.com>
version: 2.1.2
version: 2.1.2+1
dependencies:
angel_framework: ^2.0.0-alpha
convert: ^2.0.0