Skip to content
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

introduce container type of parse_request arguments #3357

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

i110
Copy link
Contributor

@i110 i110 commented Feb 22, 2024

h2o_hpack_parse_request and h2o_qpack_parse_request has too many output arguments. It's especially hard to maintain since we added several fork-only arguments in our fork, and that makes the merge harder. This PR introduces h2o_hpack_request_t which contains all of those output arguments.

@i110 i110 requested review from kazuho and deweerdt February 22, 2024 03:56
.expect = &expect,
.digests = &stream->cache_digests,
.datagram_flow_id = NULL,
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get the fuss, but I'm not sure if I like the direction of this PR.

As can be seen in these lines of changes, essentially this PR is changing making all arguments optional. When an argument is missing, they will be silently default-initialized (i.e., set to either 0 or NULL), rather than failing at compile time.

Is that the behavior we want? Assuming that we change the arguments rarely, my preference goes to detecting those changes as compile errors so that we can make sure we are doing the correct thing.

WDYT?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

None yet

3 participants