#769: Fix request pseudo-header construction for CONNECT & OPTION methods#770
Conversation
|
Thanks! For writing a unit test, you can put it in h2/tests/h2-tests/tests/client_request.rs Line 527 in 0d66e3c Set the correct fields for the |
CONNECT & OPTIONS request has special requirements regarding :path & :scheme pseudo-header which were not met. Construction of pseudo-header was fixed to not include :path & :scheme fields for CONNECT method. Empty :path field for OPTIONS requests now translates to '*' value sent in :path field. In addition to tests included in MR the CONNECT request changes were tested against server based on hyper 1.2.
|
Thanks @seanmonstar! It is occurred that when tested locally I didn't run whole set of tests and didn't notice I've broken extended connect request. So to fix this a bit more changes were required.
|
|
Hello there! Is there anything I can do to facilitate this PR get reviewed? Thanks a lot in advance. |
Noah-Kennedy
left a comment
There was a problem hiding this comment.
I reviewed the aspects of this to do with extended connect, and that looked alright to me.
Going to leave the final review to @seanmonstar.
| } | ||
| _ => {} | ||
| } | ||
| let (scheme, path) = if method == Method::CONNECT && protocol.is_none() { |
There was a problem hiding this comment.
The handling of extended connect looks correct to me here
@seanmonstar should an attempt to make a malformed request be silently corrected or should we panic?
It was blocked on me having time to review for the past two weeks. Not sure if you asked in discord earlier and that's why Sean pinged me, but I was actually mid review when you asked 😆. |
That's complete coincidence or some universe tricks :) |
CONNECT&OPTIONSrequest has special requirements regarding :path & :scheme pseudo-header which were not met.Construction of pseudo-header was fixed to not include
:path&:schemefields forCONNECTmethod. Empty:pathfield forOPTIONSrequests now translates to'*'value sent in:pathfield.CONNECTrequest changes were tested against server based on hyper 1.2.