• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

benches/H03-May-2022-123105

src/H03-May-2022-1,8061,360

tests/H03-May-2022-3,6783,147

.cargo-checksum.jsonH A D03-May-202289 11

.cargo_vcs_info.jsonH A D01-Jan-197074 65

.gitignoreH A D18-Feb-201518 32

.travis.ymlH A D27-Sep-20182 KiB7061

Cargo.tomlH A D01-Jan-19701.1 KiB3532

Cargo.toml.orig-cargoH A D27-Sep-2018597 2721

LICENSE-APACHEH A D27-Sep-201810.6 KiB202169

LICENSE-MITH A D27-Sep-20181 KiB2116

README.mdH A D27-Sep-20181.4 KiB3924

build.rsH A D27-Sep-20184.4 KiB156121

README.md

1# httparse
2
3[![Build Status](https://travis-ci.org/seanmonstar/httparse.svg?branch=master)](https://travis-ci.org/seanmonstar/httparse)
4[![Coverage Status](https://coveralls.io/repos/seanmonstar/httparse/badge.svg)](https://coveralls.io/r/seanmonstar/httparse)
5[![crates.io](https://img.shields.io/crates/v/httparse.svg)](https://crates.io/crates/httparse)
6
7A push parser for the HTTP 1.x protocol. Avoids allocations. No copy. **Fast.**
8
9Works with `no_std`, simply disable the `std` Cargo feature.
10
11[Documentation](https://docs.rs/httparse)
12[Changelog](https://github.com/seanmonstar/httparse/releases)
13
14## Usage
15
16```rust
17let mut headers = [httparse::EMPTY_HEADER; 16];
18let mut req = httparse::Request::new(&mut headers);
19
20let buf = b"GET /index.html HTTP/1.1\r\nHost";
21assert!(req.parse(buf)?.is_partial());
22
23// a partial request, so we try again once we have more data
24
25let buf = b"GET /index.html HTTP/1.1\r\nHost: example.domain\r\n\r\n";
26assert!(req.parse(buf)?.is_complete());
27```
28
29## License
30
31Licensed under either of
32
33- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://apache.org/licenses/LICENSE-2.0)
34- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
35
36### Contribution
37
38Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
39