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

#99 in Network programming

Download history 15895/week @ 2022-06-06 19981/week @ 2022-06-13 20687/week @ 2022-06-20 21266/week @ 2022-06-27 18037/week @ 2022-07-04 22357/week @ 2022-07-11 21936/week @ 2022-07-18 20942/week @ 2022-07-25 23134/week @ 2022-08-01 21609/week @ 2022-08-08 18358/week @ 2022-08-15 20783/week @ 2022-08-22 21992/week @ 2022-08-29 19630/week @ 2022-09-05 23122/week @ 2022-09-12 20148/week @ 2022-09-19

86,576 downloads per month
Used in 98 crates (10 directly)

MIT license

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.

No runtime deps