| 1 | # Range header parsing |
| 2 | |
| 3 | [](https://github.com/MarcusGrass/parse-range-headers/actions) |
| 4 | [](https://crates.io/crates/http-range-header) |
| 5 | |
| 6 | The main goals of this parser is: |
| 7 | * Follow specification [RFC-2616](https://www.ietf.org/rfc/rfc2616.txt) |
| 8 | * Behave as expected [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range) |
| 9 | * Accuracy - parses headers strictly |
| 10 | * Security - Never panics, ensured by fuzzing |
| 11 | * Stability |
| 12 | * No dependecies |
| 13 | |
| 14 | Secondary goals are: |
| 15 | * Speed |
| 16 | * Information on why the header was rejected |
| 17 | |
| 18 | The parser is strict. Any range where all parts are not syntactically correct and makes sense in the context of the underlying |
| 19 | resource will be rejected. |
| 20 | |
| 21 | ## Dev release checklist |
| 22 | |
| 23 | 1. Make sure CI passes |
| 24 | 2. Run [cargo fuzz](https://rust-fuzz.github.io/book/cargo-fuzz.html) |
| 25 | `cargo +nightly fuzz run random_string_input`, at least a minute should be good enough. If it doesn't |
| 26 | error out it has passed. |
| 27 | 3. Check msrv with for example [cargo msrv](https://github.com/foresterre/cargo-msrv), |
| 28 | if a higher msrv is wanted/needed, bump it so that it's less than or equal to [tower-http's](https://github.com/tower-rs/tower-http) |
| 29 | 4. Update changelog |
| 30 | 5. Update version |
| 31 | 6. Publish |