-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
#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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
&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 forCONNECT
method. Empty:path
field forOPTIONS
requests now translates to'*'
value sent in:path
field.CONNECT
request changes were tested against server based on hyper 1.2.