Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
benches/ | H | 03-May-2022 | - | 123 | 105 | |
src/ | H | 03-May-2022 | - | 1,806 | 1,360 | |
tests/ | H | 03-May-2022 | - | 3,678 | 3,147 | |
.cargo-checksum.json | H A D | 03-May-2022 | 89 | 1 | 1 | |
.cargo_vcs_info.json | H A D | 01-Jan-1970 | 74 | 6 | 5 | |
.gitignore | H A D | 18-Feb-2015 | 18 | 3 | 2 | |
.travis.yml | H A D | 27-Sep-2018 | 2 KiB | 70 | 61 | |
Cargo.toml | H A D | 01-Jan-1970 | 1.1 KiB | 35 | 32 | |
Cargo.toml.orig-cargo | H A D | 27-Sep-2018 | 597 | 27 | 21 | |
LICENSE-APACHE | H A D | 27-Sep-2018 | 10.6 KiB | 202 | 169 | |
LICENSE-MIT | H A D | 27-Sep-2018 | 1 KiB | 21 | 16 | |
README.md | H A D | 27-Sep-2018 | 1.4 KiB | 39 | 24 | |
build.rs | H A D | 27-Sep-2018 | 4.4 KiB | 156 | 121 |
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