commit | f2e535b6999aad4a3d65480ba19ba736f0757efd | [log] [tgz] |
---|---|---|
author | Sam Saccone <samccone@google.com> | Tue Jul 18 17:51:27 2023 +0000 |
committer | Sam Saccone <samccone@google.com> | Tue Jul 18 17:51:27 2023 +0000 |
tree | b4fbb6a354d59629532e204b17f1e6f30eb72b4c | |
parent | 0e1eb5fab8692a7bcc8a95f0b8692bad95844d5d [diff] |
Move OWNER reference master=>main. BUG=b/291759353 Change-Id: Ic8d903300694fc529e28ffb73227cd5c5c8d9c5d
A push parser for the HTTP 1.x protocol. Avoids allocations. No copy. Fast.
Works with no_std
, simply disable the std
Cargo feature.
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());
Licensed under either of
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.