seanmonstar / httparse

A push parser for the HTTP 1.x protocol in Rust.
https://docs.rs/httparse
Apache License 2.0
569 stars 110 forks source link

Allow passing custom configuration to `parse_headers` #126

Open gootorov opened 1 year ago

gootorov commented 1 year ago

There are several protocols that look almost identical to HTTP (in my case, it is SIP). Often the only difference is the request-line and/or the response-line. In SIP in particular, multiline headers are the norm (allow_obsolete_multiline_headers_in_responses).

Being able to parse the request/response-line by myself and then using parse_headers with a custom configuration would be very convenient.

gootorov commented 1 year ago

Friendly ping! :) If you're unable to review for the time being, that's totally fine of course. Only making sure this isn't forgotten.

gootorov commented 1 year ago

@seanmonstar Apologies for pinging again. Do you mind having a look at this PR? This is a small, non-breaking change. Having this merged would be really great, if possible.

If there's something that needs to be changed, such as documentation, tests, etc -- please let me know.