6 releases
0.1.5 | Feb 15, 2022 |
---|---|
0.1.4 | Feb 1, 2021 |
0.1.3 | Sep 2, 2020 |
0.1.2 | Aug 21, 2020 |
0.1.1 | Oct 2, 2016 |
#261 in Network programming
248,385 downloads per month
Used in 293 crates
(17 directly)
18KB
509 lines
rust-http-range
HTTP Range header parser. It parses Range HTTP header string as per RFC 2616.
Inspired by Go's net/http library.
Overview
Example usage:
extern crate http_range;
use http_range::{HttpRange};
fn main() {
let range_str = "bytes=0-8";
let size = 10;
match HttpRange::parse(range_str, size) {
Ok(rngs) => for r in rngs {
println!("Start {}, length {}", r.start, r.length)
},
Err(err) => println!("HttpRange parse error: {:?}", err)
};
}
Used in
Author
Luka Zakrajšek
License
MIT
lib.rs
:
http-range
HTTP Range header parser. Inspired by Go's net/http library.