Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Address TODOs #383
base: main
Are you sure you want to change the base?
Address TODOs #383
Changes from 7 commits
355e6d8
875f015
5733ac0
e5ab40d
a4fbcbb
f42c4b8
b80322f
ee52c6a
85f362f
b63cc70
79b78d9
4beeba2
9275fff
f98f134
7b4bc8b
cce49e2
68dcf9b
052660c
480cd2d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
do we need to check that these things aren't empty strings?
I see you checking the request_string, but not the others
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'm still wondering about this: should we be doing more validation on the pseudo-headers?
Like, are any of them allowed to be ""?
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.
It was checked before. from the
s_process_header_field
at hereThere 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 just found a new TODO to add to our code. From RFC-9110:
I see the H1 encoder and decoder using
aws_strutil_trim_http_whitespace()
, but I don't see us doing it anywhere in our H2 codeThere 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.
A field value MUST NOT start or end with an ASCII whitespace character (ASCII SP or HTAB, 0x20 or 0x09). here. So, I think we should not trim the white space for h2
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 just spent like an hour trying to make sense of whether or not we're doing the right thing with this hpack resize stuff. MAN this stuff is hard to understand. We just have a lot of variables with similar names, and the 1 hpack class that has both encoding and decoding logic. Can I make some suggestions?
Don't have
aws_h2_frame_encoder_set_setting_header_table_size()
callaws_hpack_set_protocol_max_size_setting()
at all. Turns out that function has no effect on an aws_hpack_context that is being used for encoding.rename
aws_hpack_set_max_table_size()->aws_hpack_set_protocol_max_size_setting()->aws_hpack_set_protocol_max_size_setting()
akaaws_hpack_decoder_update_max_table_size()
is doing the right thing. In the same way the encoder tracks asmallest
andlast
size, I think we need to do similar tracking for the decoder so we can properly check that the peer sends the right number of updates?man, this is why we need to split
aws_hpack_contextintoaws_hpack_encoder
andaws_hpack_decoder
. It's too confusing having everyone's variables and functions all mixed up together