{"action":"opened","number":1903,"pull_request":{"url":"https://api.github.com/repos/h2o/h2o/pulls/1903","id":231073864,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMDczODY0","html_url":"https://github.com/h2o/h2o/pull/1903","diff_url":"https://github.com/h2o/h2o/pull/1903.diff","patch_url":"https://github.com/h2o/h2o/pull/1903.patch","issue_url":"https://api.github.com/repos/h2o/h2o/issues/1903","number":1903,"state":"open","locked":false,"title":"Remove redundancy in how token index is determined","user":{"login":"kazuho","id":41567,"node_id":"MDQ6VXNlcjQxNTY3","avatar_url":"https://avatars2.githubusercontent.com/u/41567?v=4","gravatar_id":"","url":"https://api.github.com/users/kazuho","html_url":"https://github.com/kazuho","followers_url":"https://api.github.com/users/kazuho/followers","following_url":"https://api.github.com/users/kazuho/following{/other_user}","gists_url":"https://api.github.com/users/kazuho/gists{/gist_id}","starred_url":"https://api.github.com/users/kazuho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kazuho/subscriptions","organizations_url":"https://api.github.com/users/kazuho/orgs","repos_url":"https://api.github.com/users/kazuho/repos","events_url":"https://api.github.com/users/kazuho/events{/privacy}","received_events_url":"https://api.github.com/users/kazuho/received_events","type":"User","site_admin":false},"body":"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`.\r\n\r\nNow 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`.\r\n\r\nThe 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.\r\n\r\n`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.","created_at":"2018-11-15T05:35:04Z","updated_at":"2018-11-15T05:35:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/h2o/h2o/pulls/1903/commits","review_comments_url":"https://api.github.com/repos/h2o/h2o/pulls/1903/comments","review_comment_url":"https://api.github.com/repos/h2o/h2o/pulls/comments{/number}","comments_url":"https://api.github.com/repos/h2o/h2o/issues/1903/comments","statuses_url":"https://api.github.com/repos/h2o/h2o/statuses/0b68155695a1d8a44d4e5024e74a9c5487b2c8ef","head":{"label":"h2o:kazuho/header-flags","ref":"kazuho/header-flags","sha":"0b68155695a1d8a44d4e5024e74a9c5487b2c8ef","user":{"login":"h2o","id":9275116,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyNzUxMTY=","avatar_url":"https://avatars3.githubusercontent.com/u/9275116?v=4","gravatar_id":"","url":"https://api.github.com/users/h2o","html_url":"https://github.com/h2o","followers_url":"https://api.github.com/users/h2o/followers","following_url":"https://api.github.com/users/h2o/following{/other_user}","gists_url":"https://api.github.com/users/h2o/gists{/gist_id}","starred_url":"https://api.github.com/users/h2o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h2o/subscriptions","organizations_url":"https://api.github.com/users/h2o/orgs","repos_url":"https://api.github.com/users/h2o/repos","events_url":"https://api.github.com/users/h2o/events{/privacy}","received_events_url":"https://api.github.com/users/h2o/received_events","type":"Organization","site_admin":false},"repo":{"id":23029617,"node_id":"MDEwOlJlcG9zaXRvcnkyMzAyOTYxNw==","name":"h2o","full_name":"h2o/h2o","private":false,"owner":{"login":"h2o","id":9275116,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyNzUxMTY=","avatar_url":"https://avatars3.githubusercontent.com/u/9275116?v=4","gravatar_id":"","url":"https://api.github.com/users/h2o","html_url":"https://github.com/h2o","followers_url":"https://api.github.com/users/h2o/followers","following_url":"https://api.github.com/users/h2o/following{/other_user}","gists_url":"https://api.github.com/users/h2o/gists{/gist_id}","starred_url":"https://api.github.com/users/h2o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h2o/subscriptions","organizations_url":"https://api.github.com/users/h2o/orgs","repos_url":"https://api.github.com/users/h2o/repos","events_url":"https://api.github.com/users/h2o/events{/privacy}","received_events_url":"https://api.github.com/users/h2o/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/h2o/h2o","description":"H2O - the optimized HTTP/1, HTTP/2 server","fork":false,"url":"https://api.github.com/repos/h2o/h2o","forks_url":"https://api.github.com/repos/h2o/h2o/forks","keys_url":"https://api.github.com/repos/h2o/h2o/keys{/key_id}","collaborators_url":"https://api.github.com/repos/h2o/h2o/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/h2o/h2o/teams","hooks_url":"https://api.github.com/repos/h2o/h2o/hooks","issue_events_url":"https://api.github.com/repos/h2o/h2o/issues/events{/number}","events_url":"https://api.github.com/repos/h2o/h2o/events","assignees_url":"https://api.github.com/repos/h2o/h2o/assignees{/user}","branches_url":"https://api.github.com/repos/h2o/h2o/branches{/branch}","tags_url":"https://api.github.com/repos/h2o/h2o/tags","blobs_url":"https://api.github.com/repos/h2o/h2o/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/h2o/h2o/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/h2o/h2o/git/refs{/sha}","trees_url":"https://api.github.com/repos/h2o/h2o/git/trees{/sha}","statuses_url":"https://api.github.com/repos/h2o/h2o/statuses/{sha}","languages_url":"https://api.github.com/repos/h2o/h2o/languages","stargazers_url":"https://api.github.com/repos/h2o/h2o/stargazers","contributors_url":"https://api.github.com/repos/h2o/h2o/contributors","subscribers_url":"https://api.github.com/repos/h2o/h2o/subscribers","subscription_url":"https://api.github.com/repos/h2o/h2o/subscription","commits_url":"https://api.github.com/repos/h2o/h2o/commits{/sha}","git_commits_url":"https://api.github.com/repos/h2o/h2o/git/commits{/sha}","comments_url":"https://api.github.com/repos/h2o/h2o/comments{/number}","issue_comment_url":"https://api.github.com/repos/h2o/h2o/issues/comments{/number}","contents_url":"https://api.github.com/repos/h2o/h2o/contents/{+path}","compare_url":"https://api.github.com/repos/h2o/h2o/compare/{base}...{head}","merges_url":"https://api.github.com/repos/h2o/h2o/merges","archive_url":"https://api.github.com/repos/h2o/h2o/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/h2o/h2o/downloads","issues_url":"https://api.github.com/repos/h2o/h2o/issues{/number}","pulls_url":"https://api.github.com/repos/h2o/h2o/pulls{/number}","milestones_url":"https://api.github.com/repos/h2o/h2o/milestones{/number}","notifications_url":"https://api.github.com/repos/h2o/h2o/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/h2o/h2o/labels{/name}","releases_url":"https://api.github.com/repos/h2o/h2o/releases{/id}","deployments_url":"https://api.github.com/repos/h2o/h2o/deployments","created_at":"2014-08-16T23:59:03Z","updated_at":"2018-11-15T05:25:54Z","pushed_at":"2018-11-15T05:29:55Z","git_url":"git://github.com/h2o/h2o.git","ssh_url":"git@github.com:h2o/h2o.git","clone_url":"https://github.com/h2o/h2o.git","svn_url":"https://github.com/h2o/h2o","homepage":"https://h2o.examp1e.net","size":94937,"stargazers_count":7953,"watchers_count":7953,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":604,"mirror_url":null,"archived":false,"open_issues_count":432,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":604,"open_issues":432,"watchers":7953,"default_branch":"master"}},"base":{"label":"h2o:master","ref":"master","sha":"a281e6175a880eea8af06e11804b7dc219f32659","user":{"login":"h2o","id":9275116,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyNzUxMTY=","avatar_url":"https://avatars3.githubusercontent.com/u/9275116?v=4","gravatar_id":"","url":"https://api.github.com/users/h2o","html_url":"https://github.com/h2o","followers_url":"https://api.github.com/users/h2o/followers","following_url":"https://api.github.com/users/h2o/following{/other_user}","gists_url":"https://api.github.com/users/h2o/gists{/gist_id}","starred_url":"https://api.github.com/users/h2o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h2o/subscriptions","organizations_url":"https://api.github.com/users/h2o/orgs","repos_url":"https://api.github.com/users/h2o/repos","events_url":"https://api.github.com/users/h2o/events{/privacy}","received_events_url":"https://api.github.com/users/h2o/received_events","type":"Organization","site_admin":false},"repo":{"id":23029617,"node_id":"MDEwOlJlcG9zaXRvcnkyMzAyOTYxNw==","name":"h2o","full_name":"h2o/h2o","private":false,"owner":{"login":"h2o","id":9275116,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyNzUxMTY=","avatar_url":"https://avatars3.githubusercontent.com/u/9275116?v=4","gravatar_id":"","url":"https://api.github.com/users/h2o","html_url":"https://github.com/h2o","followers_url":"https://api.github.com/users/h2o/followers","following_url":"https://api.github.com/users/h2o/following{/other_user}","gists_url":"https://api.github.com/users/h2o/gists{/gist_id}","starred_url":"https://api.github.com/users/h2o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h2o/subscriptions","organizations_url":"https://api.github.com/users/h2o/orgs","repos_url":"https://api.github.com/users/h2o/repos","events_url":"https://api.github.com/users/h2o/events{/privacy}","received_events_url":"https://api.github.com/users/h2o/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/h2o/h2o","description":"H2O - the optimized HTTP/1, HTTP/2 server","fork":false,"url":"https://api.github.com/repos/h2o/h2o","forks_url":"https://api.github.com/repos/h2o/h2o/forks","keys_url":"https://api.github.com/repos/h2o/h2o/keys{/key_id}","collaborators_url":"https://api.github.com/repos/h2o/h2o/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/h2o/h2o/teams","hooks_url":"https://api.github.com/repos/h2o/h2o/hooks","issue_events_url":"https://api.github.com/repos/h2o/h2o/issues/events{/number}","events_url":"https://api.github.com/repos/h2o/h2o/events","assignees_url":"https://api.github.com/repos/h2o/h2o/assignees{/user}","branches_url":"https://api.github.com/repos/h2o/h2o/branches{/branch}","tags_url":"https://api.github.com/repos/h2o/h2o/tags","blobs_url":"https://api.github.com/repos/h2o/h2o/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/h2o/h2o/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/h2o/h2o/git/refs{/sha}","trees_url":"https://api.github.com/repos/h2o/h2o/git/trees{/sha}","statuses_url":"https://api.github.com/repos/h2o/h2o/statuses/{sha}","languages_url":"https://api.github.com/repos/h2o/h2o/languages","stargazers_url":"https://api.github.com/repos/h2o/h2o/stargazers","contributors_url":"https://api.github.com/repos/h2o/h2o/contributors","subscribers_url":"https://api.github.com/repos/h2o/h2o/subscribers","subscription_url":"https://api.github.com/repos/h2o/h2o/subscription","commits_url":"https://api.github.com/repos/h2o/h2o/commits{/sha}","git_commits_url":"https://api.github.com/repos/h2o/h2o/git/commits{/sha}","comments_url":"https://api.github.com/repos/h2o/h2o/comments{/number}","issue_comment_url":"https://api.github.com/repos/h2o/h2o/issues/comments{/number}","contents_url":"https://api.github.com/repos/h2o/h2o/contents/{+path}","compare_url":"https://api.github.com/repos/h2o/h2o/compare/{base}...{head}","merges_url":"https://api.github.com/repos/h2o/h2o/merges","archive_url":"https://api.github.com/repos/h2o/h2o/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/h2o/h2o/downloads","issues_url":"https://api.github.com/repos/h2o/h2o/issues{/number}","pulls_url":"https://api.github.com/repos/h2o/h2o/pulls{/number}","milestones_url":"https://api.github.com/repos/h2o/h2o/milestones{/number}","notifications_url":"https://api.github.com/repos/h2o/h2o/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/h2o/h2o/labels{/name}","releases_url":"https://api.github.com/repos/h2o/h2o/releases{/id}","deployments_url":"https://api.github.com/repos/h2o/h2o/deployments","created_at":"2014-08-16T23:59:03Z","updated_at":"2018-11-15T05:25:54Z","pushed_at":"2018-11-15T05:29:55Z","git_url":"git://github.com/h2o/h2o.git","ssh_url":"git@github.com:h2o/h2o.git","clone_url":"https://github.com/h2o/h2o.git","svn_url":"https://github.com/h2o/h2o","homepage":"https://h2o.examp1e.net","size":94937,"stargazers_count":7953,"watchers_count":7953,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":604,"mirror_url":null,"archived":false,"open_issues_count":432,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":604,"open_issues":432,"watchers":7953,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/h2o/h2o/pulls/1903"},"html":{"href":"https://github.com/h2o/h2o/pull/1903"},"issue":{"href":"https://api.github.com/repos/h2o/h2o/issues/1903"},"comments":{"href":"https://api.github.com/repos/h2o/h2o/issues/1903/comments"},"review_comments":{"href":"https://api.github.com/repos/h2o/h2o/pulls/1903/comments"},"review_comment":{"href":"https://api.github.com/repos/h2o/h2o/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/h2o/h2o/pulls/1903/commits"},"statuses":{"href":"https://api.github.com/repos/h2o/h2o/statuses/0b68155695a1d8a44d4e5024e74a9c5487b2c8ef"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":3,"additions":108,"deletions":121,"changed_files":14}}
{"actor":{"display_login":"kazuho"}}