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

Download history 72107/week @ 2024-08-06 76101/week @ 2024-08-13 69578/week @ 2024-08-20 70707/week @ 2024-08-27 74175/week @ 2024-09-03 64890/week @ 2024-09-10 63504/week @ 2024-09-17 72778/week @ 2024-09-24 68069/week @ 2024-10-01 63340/week @ 2024-10-08 65479/week @ 2024-10-15 61814/week @ 2024-10-22 60620/week @ 2024-10-29 59817/week @ 2024-11-05 64046/week @ 2024-11-12 53351/week @ 2024-11-19

248,385 downloads per month
Used in 293 crates (17 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