Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kazuho
Copy link
Member

@kazuho kazuho commented Nov 15, 2018

The side effect of #1832 has been that there are now two ways to determine if a header name is a token: one by using h2o_iovec_is_token (which refers to the address of the name) and the other by h2o_header_is_token (which refers to h2o_header_t::flags.token_index_plus1. To keep the two consistent, we introduced h2o_validate_header.

Now it seems to me that we can simplify the design by splitting h2o_header_flags_t into two structures: h2o_token_flags_t and h2o_header_flags_t.

The only flag that needs to be configurable (from outside the HTTP protocol implementation) is the dont_compress flag. We retain that in h2o_header_flags_t at the same time removing all the other fields.

h2o_token_flags_t is now part of h2o_token_t; functions that dealt with the redundant structure (i.e. h2o_validate_header, h2o_header_is_token) are removed.

@kazuho
Copy link
Member Author

kazuho commented Nov 15, 2018

@i110 Please review.

@i110
Copy link
Contributor

i110 commented Nov 15, 2018

looks SUPER GOOD to me!!

@kazuho kazuho merged commit 2a44f94 into master Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants