Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(serve-static): support range requests #63

Merged
merged 12 commits into from
Jul 15, 2023

Conversation

yusukebe
Copy link
Member

This PR will support HTTP range requests in Serve Static Middleware. Based on #18

Hoodgail and others added 11 commits January 20, 2023 21:11
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.
The status code should only be 206 when range headers are preasent, else, it should be 200
Connect Handler type for the middleware function
@yusukebe
Copy link
Member Author

@Hoodgail

I've created this PR, based on your PR #18. I've added some tests and additional logic. I'll merge this, attributing you as a co-author.

@tangye1234

Could you please review this?

src/serve-static.ts Outdated Show resolved Hide resolved
@yusukebe
Copy link
Member Author

@tangye1234

Updated!

@yusukebe
Copy link
Member Author

Thanks! Merge now.

@yusukebe yusukebe merged commit 4d8c6e6 into main Jul 15, 2023
3 checks passed
@yusukebe yusukebe deleted the feat/serve-static-partial-content branch July 15, 2023 14:34
@yusukebe yusukebe mentioned this pull request Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants