-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Range suffixes are not Rust RangeTo
An HTTP Range of `bytes=-100` means a suffix, the last 100 bytes. This was wrongly parsed as the Rust range `..100`, which means the first 100 bytes. This has been fixed, but doing so required change `Range::iter` to accept a length argument, to determine if the ranges are satisfiable. BREAKING CHANGE: Change `.iter()` calls to `.satisfiable_ranges(len)`. Also, the `Range::bytes()` constructor will now return an error if pass a `RangeTo` (e.g. `Range::bytes(..100)`).
- Loading branch information
1 parent
7d784cd
commit fb9a4e0
Showing
1 changed file
with
35 additions
and
6 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