Closed unicornborn closed 8 years ago
I'm using koa-range with koa-better-static, and the user is making a request with
koa-range
koa-better-static
if-modified-since:Fri, 01 Apr 2016 18:21:16 GMT range:bytes=15110-6381395
koa-better-static returns 304 NOT MODIFIED with an empty body because the file has not been modified since that date, but now koa-range tries to access this.body.length which throws an error as its dereferencing undefined
304 NOT MODIFIED
this.body.length
@unicornborn please try to apply https://github.com/koajs/koa-range/pull/8.patch and see if it works on your project, thank you :-)
Try with 0.2.1 :-)
I'm using
koa-range
withkoa-better-static
, and the user is making a request withkoa-better-static
returns304 NOT MODIFIED
with an empty body because the file has not been modified since that date, but nowkoa-range
tries to accessthis.body.length
which throws an error as its dereferencing undefined