cmorten / opine

Minimalist web framework for Deno ported from ExpressJS.
https://github.com/cmorten/opine/blob/main/.github/API/api.md
MIT License
854 stars 43 forks source link

[#145] [#151] don't close file before fully read to stream #153

Closed cmorten closed 2 years ago

cmorten commented 2 years ago

Issue

Fixes #145 Fixes #151

Details

We were closing file resources before they were being fully read to the response stream. This change updates the offset reader to return a Deno.Reader & Deno.Closer so closing the file resource can be handled alongside the read, and not accidentally closed early.

CheckList