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

#298 in Network programming

Download history 66139/week @ 2024-09-19 74253/week @ 2024-09-26 63385/week @ 2024-10-03 65278/week @ 2024-10-10 62915/week @ 2024-10-17 60899/week @ 2024-10-24 60781/week @ 2024-10-31 59295/week @ 2024-11-07 66138/week @ 2024-11-14 61457/week @ 2024-11-21 56360/week @ 2024-11-28 60489/week @ 2024-12-05 63064/week @ 2024-12-12 43312/week @ 2024-12-19 31925/week @ 2024-12-26 40831/week @ 2025-01-02

190,459 downloads per month
Used in 299 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