Bug: 288308432

Clone this repo:
  1. ae57b29 Migrate 25 crates to monorepo. am: 9d97e0c587 by James Farrell · 9 weeks ago main master
  2. 9d97e0c Migrate 25 crates to monorepo. by James Farrell · 9 weeks ago main-16k
  3. 0c694bd Update Android.bp by running cargo_embargo am: d7b570fbeb by James Farrell · 3 months ago
  4. d7b570f Update Android.bp by running cargo_embargo by James Farrell · 3 months ago
  5. d1bd3b1 Update Android.bp by running cargo_embargo am: 56e077df35 am: 7d9774f00a by James Farrell · 5 months ago android15-tests-dev aml_art_350913340 aml_cbr_350910020 aml_doc_350915120 aml_ext_350912020 aml_hef_350921160 aml_med_350914000 aml_net_350911020 aml_per_350910080 aml_rkp_350910000 aml_sdk_350910000 aml_sta_350911020 aml_tet_350911120 aml_uwb_350911040 aml_wif_350912040

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.