Skip to content

Ignoring invalid headers for requests - #145

Merged
seanmonstar merged 6 commits into
seanmonstar:masterfrom
grnmeira:allow-invalid-headers-req
Aug 8, 2023
Merged

seanmonstar merged 6 commits into
seanmonstar:masterfrom
grnmeira:allow-invalid-headers-req

Conversation

@grnmeira

@grnmeira grnmeira commented Aug 4, 2023 •

Copy link
Copy Markdown
Contributor

The idea for this PR came up from this discussion in the hyper repo.

This PR tries to make a request version of the ParserConfig::ignore_invalid_headers_in_responses configuration, introduced as ParserConfig::ignore_invalid_headers_in_requests, so that we can also ignore invalid headers in requests.

In order to achieve that avoiding breaking backwards compatibility, it splits the ParserConfig struct used for parse_headers_iter_uninit into ParserConfig and HeaderParserConfig.

Happy to reassess the tests or the approach.

Comment thread src/macros.rs
@@ -1,4 +1,4 @@
///! Utility macros
//! Utility macros

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why clippy started acting up with this now. The lint was introduced on 1.70 and latest commit is the one enabling clippy for the pipelines.

@grnmeira

grnmeira commented Aug 8, 2023

Copy link
Copy Markdown
Contributor Author

@seanmonstar any chances we could get this in? Happy to make any changes if needed too.

@seanmonstar
seanmonstar merged commit a3c10fd into seanmonstar:master Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants