Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignoring invalid headers for requests #145

Merged
merged 6 commits into from Aug 8, 2023

Conversation

grnmeira
Copy link
Contributor

@grnmeira grnmeira commented Aug 4, 2023

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.

@@ -1,4 +1,4 @@
///! Utility macros
//! Utility macros
Copy link
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
Copy link
Contributor Author

grnmeira commented Aug 8, 2023

@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
34 checks passed
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.

None yet

2 participants