Feat: Add a feature flag to ignore connection headers#705
Feat: Add a feature flag to ignore connection headers#705eaufavor wants to merge 1 commit intohyperium:masterfrom
Conversation
|
Are there any other widely used implementations that support this? I initially think the pressure should instead be pushed back onto those servers to change, since weakening the implementations is how HTTP/1.1 got to have so many edge cases. |
|
Good question. https://origin.eaufavor.net/test_h2_header/
I have not yet tested other connection headers. |
|
Why is "CI / Check MSRV (pull_request)" failing? |
|
This #708? |
|
Ah, could you rebase then? |
According to the RFC, when encountering connection headers, H2 should treat them as protocol errors. However, in reality there are servers just setting these headers but only for informational purpose. This feature allow the receiving end to just ignore these headers without bailing the entire stream.
86ea93f to
9dbf011
Compare
| { | ||
| tracing::trace!("load_hpack; connection level header"); | ||
| malformed = true; | ||
| if cfg!(feature = "ignore_connection_header") { |
There was a problem hiding this comment.
I don't think this should be a cargo feature, instead it should be a runtime option, so that each part of a large system can decide whether or not they want to enable it.
There was a problem hiding this comment.
Sounds good. I can try to update (no promises when). Just wanted to make sure there is a chance for features like this to be accepted.
According to the RFC, when encountering connection headers, H2 should treat them as protocol errors. However, in reality there are servers just setting these headers but only for informational purpose.
This feature allow the receiving end to just ignore these headers without bailing the entire stream.
I'm just putting this out here to see whether it is possible for things like this to be accepted.