{"action":"created","comment":{"url":"https://api.github.com/repos/h2o/h2o/pulls/comments/74883638","id":74883638,"diff_hunk":"@@ -19,18 +19,17 @@\n  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n  * IN THE SOFTWARE.\n  */\n-#include \"h2o.h\"\n-\n #include <inttypes.h>\n+#include \"h2o.h\"\n \n-struct st_h2o_debug_state_handler_t {\n+struct st_h2o_http2_debug_state_handler_t {\n     h2o_handler_t super;\n     int hpack_enabled : 1;","path":"lib/handler/http2_debug_state.c","position":null,"original_position":12,"commit_id":"c6508bc22969165b092889df3154f56e28ec9791","original_commit_id":"c6508bc22969165b092889df3154f56e28ec9791","user":{"login":"kazuho","id":41567,"avatar_url":"https://avatars.githubusercontent.com/u/41567?v=3","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":"If you want a boolean, please use `unsigned : 1` that takes either 0 or 1. `int :1` takes two either 0 or -1.\r\n\r\nOr simply using `int` or `unsigned` without `:nnn` would be sufficient in this case, considering the fact that the size of the struct would be indifferent and that we wouldn't have many instances of this struct.","created_at":"2016-08-16T06:52:12Z","updated_at":"2016-08-16T06:52:12Z","html_url":"https://github.com/h2o/h2o/pull/1019#discussion_r74883638","pull_request_url":"https://api.github.com/repos/h2o/h2o/pulls/1019","_links":{"self":{"href":"https://api.github.com/repos/h2o/h2o/pulls/comments/74883638"},"html":{"href":"https://github.com/h2o/h2o/pull/1019#discussion_r74883638"},"pull_request":{"href":"https://api.github.com/repos/h2o/h2o/pulls/1019"}}},"pull_request":{"url":"https://api.github.com/repos/h2o/h2o/pulls/1019","id":80591320,"html_url":"https://github.com/h2o/h2o/pull/1019","diff_url":"https://github.com/h2o/h2o/pull/1019.diff","patch_url":"https://github.com/h2o/h2o/pull/1019.patch","issue_url":"https://api.github.com/repos/h2o/h2o/issues/1019","number":1019,"state":"open","locked":false,"title":"add http2-debug-state feature","user":{"login":"i110","id":969287,"avatar_url":"https://avatars.githubusercontent.com/u/969287?v=3","gravatar_id":"","url":"https://api.github.com/users/i110","html_url":"https://github.com/i110","followers_url":"https://api.github.com/users/i110/followers","following_url":"https://api.github.com/users/i110/following{/other_user}","gists_url":"https://api.github.com/users/i110/gists{/gist_id}","starred_url":"https://api.github.com/users/i110/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i110/subscriptions","organizations_url":"https://api.github.com/users/i110/orgs","repos_url":"https://api.github.com/users/i110/repos","events_url":"https://api.github.com/users/i110/events{/privacy}","received_events_url":"https://api.github.com/users/i110/received_events","type":"User","site_admin":false},"body":"Implemented `HTTP/2 Implementation Debug State` which is described below:\r\nhttps://tools.ietf.org/html/draft-benfield-http2-debug-state-00\r\n\r\nSample Response:\r\n```\r\n< HTTP/2 200\r\n< server: h2o/2.1.0-DEV\r\n< date: Tue, 09 Aug 2016 09:50:17 GMT\r\n< content-type: application/json; charset=utf-8\r\n< cache-control: no-cache, no-store\r\n< conn-flow-in: 65535\r\n< conn-flow-out: 65535\r\n<\r\n{\r\n  \"settings\": {\r\n    \"SETTINGS_HEADER_TABLE_SIZE\": 4096,\r\n    \"SETTINGS_ENABLE_PUSH\": 0,\r\n    \"SETTINGS_MAX_CONCURRENT_STREAMS\": 100,\r\n    \"SETTINGS_INITIAL_WINDOW_SIZE\": 16777216,\r\n    \"SETTINGS_MAX_FRAME_SIZE\": 16384\r\n  },\r\n  \"peerSettings\": {\r\n    \"SETTINGS_HEADER_TABLE_SIZE\": 4096,\r\n    \"SETTINGS_ENABLE_PUSH\": 1,\r\n    \"SETTINGS_MAX_CONCURRENT_STREAMS\": 4294967295,\r\n    \"SETTINGS_INITIAL_WINDOW_SIZE\": 65535,\r\n    \"SETTINGS_MAX_FRAME_SIZE\": 16384\r\n  },\r\n  \"connFlowOut\": 65535,\r\n  \"connFlowIn\": 65535,\r\n  \"streams\": {\r\n    \"1\": {\r\n      \"state\": \"OPEN\",\r\n      \"flowIn\": 16777216,\r\n      \"flowOut\": 65535,\r\n      \"dataIn\": 0,\r\n      \"dataOut\": 0\r\n    }\r\n  },\r\n  \"hpack\": {\r\n    \"inbound_table_size\": 3,\r\n    \"inbound_dynamic_header_table\": [\r\n      [ \"accept\", \"*/*\" ],\r\n      [ \"user-agent\", \"curl/7.49.1\" ],\r\n      [ \":authority\", \"127.0.0.1:8080\" ]\r\n    ],\r\n    \"outbound_table_size\": 0,\r\n    \"outbound_dynamic_header_table\": [\r\n    ]\r\n  },\r\n  \"sentGoAway\": false\r\n}\r\n```\r\n\r\nPoints to consider:\r\n\r\n* Using debugging URI with proxies may have security issues (being discussed at https://github.com/python-hyper/draft-http2-debug-state/issues/7)\r\n    * When a connection sharing happens in a proxy, one's hpack state (including security-concerned fields) may be exposed to another\r\n    * Perhaps the next draft will mention a switch which can be used to specify whether `hpack` property is included in the response or not (see: https://github.com/python-hyper/draft-http2-debug-state/commit/532c5315c8b8ab28993eff69e232dd261096359d)\r\n    * This implementation doesn't have such a switch yet, because I understand and assume that in almost cases this feature will be used in the controllable environment, but we should watch and see the discussion, and add that switch when the next draft is published\r\n* When a request comes via HTTP/1, I guess that the server should resnpond with 404\r\n    * https://github.com/python-hyper/draft-http2-debug-state/issues/7","created_at":"2016-08-09T09:49:24Z","updated_at":"2016-08-16T06:52:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"effe05044d0d499bf3a714dfc2d21508d47a55a7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/h2o/h2o/pulls/1019/commits","review_comments_url":"https://api.github.com/repos/h2o/h2o/pulls/1019/comments","review_comment_url":"https://api.github.com/repos/h2o/h2o/pulls/comments{/number}","comments_url":"https://api.github.com/repos/h2o/h2o/issues/1019/comments","statuses_url":"https://api.github.com/repos/h2o/h2o/statuses/c6508bc22969165b092889df3154f56e28ec9791","head":{"label":"i110:i110/http2-debug-state","ref":"i110/http2-debug-state","sha":"c6508bc22969165b092889df3154f56e28ec9791","user":{"login":"i110","id":969287,"avatar_url":"https://avatars.githubusercontent.com/u/969287?v=3","gravatar_id":"","url":"https://api.github.com/users/i110","html_url":"https://github.com/i110","followers_url":"https://api.github.com/users/i110/followers","following_url":"https://api.github.com/users/i110/following{/other_user}","gists_url":"https://api.github.com/users/i110/gists{/gist_id}","starred_url":"https://api.github.com/users/i110/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i110/subscriptions","organizations_url":"https://api.github.com/users/i110/orgs","repos_url":"https://api.github.com/users/i110/repos","events_url":"https://api.github.com/users/i110/events{/privacy}","received_events_url":"https://api.github.com/users/i110/received_events","type":"User","site_admin":false},"repo":{"id":64739299,"name":"h2o","full_name":"i110/h2o","owner":{"login":"i110","id":969287,"avatar_url":"https://avatars.githubusercontent.com/u/969287?v=3","gravatar_id":"","url":"https://api.github.com/users/i110","html_url":"https://github.com/i110","followers_url":"https://api.github.com/users/i110/followers","following_url":"https://api.github.com/users/i110/following{/other_user}","gists_url":"https://api.github.com/users/i110/gists{/gist_id}","starred_url":"https://api.github.com/users/i110/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i110/subscriptions","organizations_url":"https://api.github.com/users/i110/orgs","repos_url":"https://api.github.com/users/i110/repos","events_url":"https://api.github.com/users/i110/events{/privacy}","received_events_url":"https://api.github.com/users/i110/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/i110/h2o","description":"H2O - the optimized HTTP/1, HTTP/2 server","fork":true,"url":"https://api.github.com/repos/i110/h2o","forks_url":"https://api.github.com/repos/i110/h2o/forks","keys_url":"https://api.github.com/repos/i110/h2o/keys{/key_id}","collaborators_url":"https://api.github.com/repos/i110/h2o/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/i110/h2o/teams","hooks_url":"https://api.github.com/repos/i110/h2o/hooks","issue_events_url":"https://api.github.com/repos/i110/h2o/issues/events{/number}","events_url":"https://api.github.com/repos/i110/h2o/events","assignees_url":"https://api.github.com/repos/i110/h2o/assignees{/user}","branches_url":"https://api.github.com/repos/i110/h2o/branches{/branch}","tags_url":"https://api.github.com/repos/i110/h2o/tags","blobs_url":"https://api.github.com/repos/i110/h2o/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/i110/h2o/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/i110/h2o/git/refs{/sha}","trees_url":"https://api.github.com/repos/i110/h2o/git/trees{/sha}","statuses_url":"https://api.github.com/repos/i110/h2o/statuses/{sha}","languages_url":"https://api.github.com/repos/i110/h2o/languages","stargazers_url":"https://api.github.com/repos/i110/h2o/stargazers","contributors_url":"https://api.github.com/repos/i110/h2o/contributors","subscribers_url":"https://api.github.com/repos/i110/h2o/subscribers","subscription_url":"https://api.github.com/repos/i110/h2o/subscription","commits_url":"https://api.github.com/repos/i110/h2o/commits{/sha}","git_commits_url":"https://api.github.com/repos/i110/h2o/git/commits{/sha}","comments_url":"https://api.github.com/repos/i110/h2o/comments{/number}","issue_comment_url":"https://api.github.com/repos/i110/h2o/issues/comments{/number}","contents_url":"https://api.github.com/repos/i110/h2o/contents/{+path}","compare_url":"https://api.github.com/repos/i110/h2o/compare/{base}...{head}","merges_url":"https://api.github.com/repos/i110/h2o/merges","archive_url":"https://api.github.com/repos/i110/h2o/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/i110/h2o/downloads","issues_url":"https://api.github.com/repos/i110/h2o/issues{/number}","pulls_url":"https://api.github.com/repos/i110/h2o/pulls{/number}","milestones_url":"https://api.github.com/repos/i110/h2o/milestones{/number}","notifications_url":"https://api.github.com/repos/i110/h2o/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/i110/h2o/labels{/name}","releases_url":"https://api.github.com/repos/i110/h2o/releases{/id}","deployments_url":"https://api.github.com/repos/i110/h2o/deployments","created_at":"2016-08-02T08:32:41Z","updated_at":"2016-08-02T08:32:46Z","pushed_at":"2016-08-16T06:24:59Z","git_url":"git://github.com/i110/h2o.git","ssh_url":"git@github.com:i110/h2o.git","clone_url":"https://github.com/i110/h2o.git","svn_url":"https://github.com/i110/h2o","homepage":"https://h2o.examp1e.net","size":49735,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"h2o:master","ref":"master","sha":"8b91e0c543cc2a68dd5c71930f0890f9bb9a1d8f","user":{"login":"h2o","id":9275116,"avatar_url":"https://avatars.githubusercontent.com/u/9275116?v=3","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,"name":"h2o","full_name":"h2o/h2o","owner":{"login":"h2o","id":9275116,"avatar_url":"https://avatars.githubusercontent.com/u/9275116?v=3","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},"private":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":"2016-08-16T04:13:50Z","pushed_at":"2016-08-16T06:24:59Z","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":55473,"stargazers_count":5862,"watchers_count":5862,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":443,"mirror_url":null,"open_issues_count":255,"forks":443,"open_issues":255,"watchers":5862,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/h2o/h2o/pulls/1019"},"html":{"href":"https://github.com/h2o/h2o/pull/1019"},"issue":{"href":"https://api.github.com/repos/h2o/h2o/issues/1019"},"comments":{"href":"https://api.github.com/repos/h2o/h2o/issues/1019/comments"},"review_comments":{"href":"https://api.github.com/repos/h2o/h2o/pulls/1019/comments"},"review_comment":{"href":"https://api.github.com/repos/h2o/h2o/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/h2o/h2o/pulls/1019/commits"},"statuses":{"href":"https://api.github.com/repos/h2o/h2o/statuses/c6508bc22969165b092889df3154f56e28ec9791"}}}}
{"actor":{"display_login":"kazuho"}}