Skip to content

Commit 8c90571

Browse files
committed
Make parse_with_config public
1 parent 55c762d commit 8c90571

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,11 @@ impl<'h, 'b> Request<'h, 'b> {
520520
self.parse_with_config_and_uninit_headers(buf, &Default::default(), headers)
521521
}
522522

523+
/// Configure and try to parse a buffer of bytes into the Request.
524+
///
525+
/// Returns byte offset in `buf` to start of HTTP body.
523526
#[tracing::instrument(skip_all)]
524-
fn parse_with_config(&mut self, buf: &'b [u8], config: &ParserConfig) -> Result<usize> {
527+
pub fn parse_with_config(&mut self, buf: &'b [u8], config: &ParserConfig) -> Result<usize> {
525528
let headers = mem::take(&mut self.headers);
526529

527530
/* SAFETY: see `parse_headers_iter_uninit` guarantees */

0 commit comments

Comments
 (0)