-
Notifications
You must be signed in to change notification settings - Fork 125
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
assets: add range request support for FileHandler #628
assets: add range request support for FileHandler #628
Conversation
This adds range request support for FileHandler. This is a critical feature for handling large files, or any application that will require range request support, e.g. video or audio streaming. This implementation currentyl only supports ranges that result in a single response, i.e. multiple ranges are not supported. This implementation will return an error if a range is open from both ends, or if the range beginning is larger than the end. Signed-off-by: Janne Pelkonen <jpelkonen@ideanovatech.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR! I've added a few comments, the rest looks really good
…am-rs#628 Specifically: - Use pattern match instead of unwrap - Simplify resolve_range by reducing nesting - Use doc comments for functions - Use method format for seek Signed-off-by: Janne Pelkonen <jpelkonen@ideanovatech.com>
@msrd0 I appreciate your timely feedback and have addressed the issues raised in my latest commit. Thanks! |
Codecov Report
@@ Coverage Diff @@
## main #628 +/- ##
==========================================
+ Coverage 78.33% 78.73% +0.40%
==========================================
Files 72 72
Lines 2049 2088 +39
==========================================
+ Hits 1605 1644 +39
Misses 444 444
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
…otham-rs#628 Use method format for seek Signed-off-by: Janne Pelkonen <jpelkonen@ideanovatech.com>
This adds range request support for FileHandler. This is a critical feature for handling large files, or any application that will require range request support, e.g. video or audio streaming.
This implementation currentyl only supports ranges that result in a single response, i.e. multiple ranges are not supported.
This implementation will return an error if a range is open from both ends, or if the range beginning is larger than the end.