Replies: 3 comments 2 replies
-
Yes, it does make sense to add a config setting for ignoring invalid headers in requests. We focused on responses back then because that's the only location we found invalid headers, but given you found some in requests that makes sense now. As for the actual implementation, you first want to start with httparse as you said, maybe take inspiration from the commit that introduces |
Beta Was this translation helpful? Give feedback.
-
PR here: seanmonstar/httparse#145 |
Beta Was this translation helpful? Give feedback.
-
Now that the PR is merged, what are the forces that drive httparse releases at the moment? I have interest in introducing this option for hyper if the idea is welcome. |
Beta Was this translation helpful? Give feedback.
-
I'm not a hundred percent sure how to approach this, but basically I've been having some issues when dealing with requests containing invalid headers.
I noticed this while using hudsucker, a HTTPS proxy lib that uses hyper. I noticed some specific requests that have trouble with how httparse deal with them. While debugging it's clear that the errors I get come from what httparse sees as invalid headers, and also I noticed that httparse has some options to recover from these invalid headers, apparently at first focused on responses, not requests.
So I'm looking for some directions here of what can be done, I'd be happy to help with pull requests if needed too. My first impressions tell me that:
ParserConfig
to have an extra "ignore_invalid_headers_in_requests" field?ParseContext
already has some configurations for responses, we could introduce something similar in this case for requests.Any help is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions