-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(serve-static): support range requests (#63)
* Update serve-static.ts Many fixes * Pathnames I just spot an other issue, if a path has spaces or some other special letters in them, most browsers will encode it as a URI component, so we have to decode it. * Status code The status code should only be 206 when range headers are preasent, else, it should be 200 * Prettier & Type fix * Tests * Update serve-static.ts Connect Handler type for the middleware function * merge main * support if client range exceeds the data size * merge * use `Readable.toWeb()` --------- Co-authored-by: Benjamin <45743294+Hoodgail@users.noreply.github.com>
- Loading branch information
Showing
2 changed files
with
91 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters