Go to file
openharmony_ci 202bbb2a45
!2 README.OpenSource 中License信息整改
Merge pull request !2 from peizhe/master
2023-05-05 02:26:11 +00:00
.github run Miri on CI 2022-03-28 17:09:19 -07:00
benches Edition 2018 (#121) 2022-08-29 20:51:35 -07:00
fuzz Fix coverage build by updating libfuzzer-sys crate 2021-04-09 10:36:16 -07:00
src Edition 2018 (#121) 2022-08-29 20:51:35 -07:00
tests Edition 2018 (#121) 2022-08-29 20:51:35 -07:00
.gitignore init 2015-02-20 10:32:22 -08:00
BUILD.gn Add GN Build Files and Custom Modifications 2023-04-18 18:14:34 +08:00
build.rs use fallback implementation in Miri 2022-03-28 17:09:19 -07:00
Cargo.toml v1.8.0 2022-08-30 14:48:24 -07:00
LICENSE-APACHE dual license under MIT or Apache-2.0 2016-11-07 13:39:07 -08:00
LICENSE-MIT Bump LICENSE year 2021-04-07 13:41:10 -07:00
README.md Issue #70 - Update README to be consistent with docs example (#105) 2021-09-23 15:09:34 +00:00
README.OpenSource README.OpenSource 中License信息整改 2023-05-04 09:22:46 +08:00

httparse

crates.io Released API docs MIT licensed CI Discord chat

A push parser for the HTTP 1.x protocol. Avoids allocations. No copy. Fast.

Works with no_std, simply disable the std Cargo feature.

Changelog

Usage

let mut headers = [httparse::EMPTY_HEADER; 64];
let mut req = httparse::Request::new(&mut headers);

let buf = b"GET /index.html HTTP/1.1\r\nHost";
assert!(req.parse(buf)?.is_partial());

// a partial request, so we try again once we have more data

let buf = b"GET /index.html HTTP/1.1\r\nHost: example.domain\r\n\r\n";
assert!(req.parse(buf)?.is_complete());

License

Licensed under either of

Contribution

Unless 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.