{"action":"created","comment":{"url":"https://api.github.com/repos/python-hyper/hyper-h2/pulls/comments/86681873","pull_request_review_id":7329228,"id":86681873,"diff_hunk":"@@ -197,10 +197,10 @@ def validate_headers(headers, hdr_validation_flags):\n     headers = _reject_surrounding_whitespace(\n         headers, hdr_validation_flags\n     )\n-    headers = _reject_te(\n+    headers = _strip_connection_header(","path":"h2/utilities.py","position":5,"original_position":5,"commit_id":"e07538e84b1ef10ac04064b683ade614ba27c2f3","original_commit_id":"e07538e84b1ef10ac04064b683ade614ba27c2f3","user":{"login":"Lukasa","id":1382556,"avatar_url":"https://avatars.githubusercontent.com/u/1382556?v=3","gravatar_id":"","url":"https://api.github.com/users/Lukasa","html_url":"https://github.com/Lukasa","followers_url":"https://api.github.com/users/Lukasa/followers","following_url":"https://api.github.com/users/Lukasa/following{/other_user}","gists_url":"https://api.github.com/users/Lukasa/gists{/gist_id}","starred_url":"https://api.github.com/users/Lukasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lukasa/subscriptions","organizations_url":"https://api.github.com/users/Lukasa/orgs","repos_url":"https://api.github.com/users/Lukasa/repos","events_url":"https://api.github.com/users/Lukasa/events{/privacy}","received_events_url":"https://api.github.com/users/Lukasa/received_events","type":"User","site_admin":false},"body":"I suspect the answer should be that we should consider this a normalisation step on outbound headers only. We should continue to hold our peers to the same standard as RFC7540 requires, but we can make our users lives easier by stripping these headers for them. That means this should be a new normalisation step in `normalize_outbound_headers`, rather than an adjustment of this current filtering logic.","created_at":"2016-11-06T09:06:16Z","updated_at":"2016-11-06T09:06:38Z","html_url":"https://github.com/python-hyper/hyper-h2/pull/382#discussion_r86681873","pull_request_url":"https://api.github.com/repos/python-hyper/hyper-h2/pulls/382","_links":{"self":{"href":"https://api.github.com/repos/python-hyper/hyper-h2/pulls/comments/86681873"},"html":{"href":"https://github.com/python-hyper/hyper-h2/pull/382#discussion_r86681873"},"pull_request":{"href":"https://api.github.com/repos/python-hyper/hyper-h2/pulls/382"}}},"pull_request":{"url":"https://api.github.com/repos/python-hyper/hyper-h2/pulls/382","id":92476300,"html_url":"https://github.com/python-hyper/hyper-h2/pull/382","diff_url":"https://github.com/python-hyper/hyper-h2/pull/382.diff","patch_url":"https://github.com/python-hyper/hyper-h2/pull/382.patch","issue_url":"https://api.github.com/repos/python-hyper/hyper-h2/issues/382","number":382,"state":"open","locked":false,"title":"Remove connection specific headers","user":{"login":"nateprewitt","id":5271761,"avatar_url":"https://avatars.githubusercontent.com/u/5271761?v=3","gravatar_id":"","url":"https://api.github.com/users/nateprewitt","html_url":"https://github.com/nateprewitt","followers_url":"https://api.github.com/users/nateprewitt/followers","following_url":"https://api.github.com/users/nateprewitt/following{/other_user}","gists_url":"https://api.github.com/users/nateprewitt/gists{/gist_id}","starred_url":"https://api.github.com/users/nateprewitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nateprewitt/subscriptions","organizations_url":"https://api.github.com/users/nateprewitt/orgs","repos_url":"https://api.github.com/users/nateprewitt/repos","events_url":"https://api.github.com/users/nateprewitt/events{/privacy}","received_events_url":"https://api.github.com/users/nateprewitt/received_events","type":"User","site_admin":false},"body":"This should address the issue discussed in lukasa/hyper#291. I expanded the scope of this PR a bit after reading RFC7540 because it has pretty clear wording on what to do in this situation.\r\n\r\n###### RFC7540 §  8.1.2.2\r\n> This means that an intermediary transforming an HTTP/1.x message to\r\n   HTTP/2 will need to remove any header fields nominated by the\r\n   Connection header field, along with the Connection header field\r\n   itself.  Such intermediaries SHOULD also remove other connection-\r\n   specific header fields, such as Keep-Alive, Proxy-Connection,\r\n   Transfer-Encoding, and Upgrade, even if they are not nominated by the\r\n   Connection header field.\r\n\r\nThere may have been another discussion on why this portion wasn't previously implemented but I couldn't find it from a cursory search.\r\n\r\nWith this patch, `h2` will now strip all connection related fields from headers. While the RFC specifies this specifically for messages transformed from HTTP/1.x to HTTP/2, I didn't initially implement a check because I wanted to check first. Does this distinction matter in practice, or will a universal strip work?","created_at":"2016-11-06T03:56:48Z","updated_at":"2016-11-06T09:06:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ef525131dfedea7f1e19a4d10703e91769c1d29","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/python-hyper/hyper-h2/pulls/382/commits","review_comments_url":"https://api.github.com/repos/python-hyper/hyper-h2/pulls/382/comments","review_comment_url":"https://api.github.com/repos/python-hyper/hyper-h2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/python-hyper/hyper-h2/issues/382/comments","statuses_url":"https://api.github.com/repos/python-hyper/hyper-h2/statuses/e07538e84b1ef10ac04064b683ade614ba27c2f3","head":{"label":"nateprewitt:remove_connection_specific_headers","ref":"remove_connection_specific_headers","sha":"e07538e84b1ef10ac04064b683ade614ba27c2f3","user":{"login":"nateprewitt","id":5271761,"avatar_url":"https://avatars.githubusercontent.com/u/5271761?v=3","gravatar_id":"","url":"https://api.github.com/users/nateprewitt","html_url":"https://github.com/nateprewitt","followers_url":"https://api.github.com/users/nateprewitt/followers","following_url":"https://api.github.com/users/nateprewitt/following{/other_user}","gists_url":"https://api.github.com/users/nateprewitt/gists{/gist_id}","starred_url":"https://api.github.com/users/nateprewitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nateprewitt/subscriptions","organizations_url":"https://api.github.com/users/nateprewitt/orgs","repos_url":"https://api.github.com/users/nateprewitt/repos","events_url":"https://api.github.com/users/nateprewitt/events{/privacy}","received_events_url":"https://api.github.com/users/nateprewitt/received_events","type":"User","site_admin":false},"repo":{"id":67060010,"name":"hyper-h2","full_name":"nateprewitt/hyper-h2","owner":{"login":"nateprewitt","id":5271761,"avatar_url":"https://avatars.githubusercontent.com/u/5271761?v=3","gravatar_id":"","url":"https://api.github.com/users/nateprewitt","html_url":"https://github.com/nateprewitt","followers_url":"https://api.github.com/users/nateprewitt/followers","following_url":"https://api.github.com/users/nateprewitt/following{/other_user}","gists_url":"https://api.github.com/users/nateprewitt/gists{/gist_id}","starred_url":"https://api.github.com/users/nateprewitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nateprewitt/subscriptions","organizations_url":"https://api.github.com/users/nateprewitt/orgs","repos_url":"https://api.github.com/users/nateprewitt/repos","events_url":"https://api.github.com/users/nateprewitt/events{/privacy}","received_events_url":"https://api.github.com/users/nateprewitt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nateprewitt/hyper-h2","description":"HTTP/2 State-Machine based protocol implementation","fork":true,"url":"https://api.github.com/repos/nateprewitt/hyper-h2","forks_url":"https://api.github.com/repos/nateprewitt/hyper-h2/forks","keys_url":"https://api.github.com/repos/nateprewitt/hyper-h2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nateprewitt/hyper-h2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nateprewitt/hyper-h2/teams","hooks_url":"https://api.github.com/repos/nateprewitt/hyper-h2/hooks","issue_events_url":"https://api.github.com/repos/nateprewitt/hyper-h2/issues/events{/number}","events_url":"https://api.github.com/repos/nateprewitt/hyper-h2/events","assignees_url":"https://api.github.com/repos/nateprewitt/hyper-h2/assignees{/user}","branches_url":"https://api.github.com/repos/nateprewitt/hyper-h2/branches{/branch}","tags_url":"https://api.github.com/repos/nateprewitt/hyper-h2/tags","blobs_url":"https://api.github.com/repos/nateprewitt/hyper-h2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nateprewitt/hyper-h2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nateprewitt/hyper-h2/git/refs{/sha}","trees_url":"https://api.github.com/repos/nateprewitt/hyper-h2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nateprewitt/hyper-h2/statuses/{sha}","languages_url":"https://api.github.com/repos/nateprewitt/hyper-h2/languages","stargazers_url":"https://api.github.com/repos/nateprewitt/hyper-h2/stargazers","contributors_url":"https://api.github.com/repos/nateprewitt/hyper-h2/contributors","subscribers_url":"https://api.github.com/repos/nateprewitt/hyper-h2/subscribers","subscription_url":"https://api.github.com/repos/nateprewitt/hyper-h2/subscription","commits_url":"https://api.github.com/repos/nateprewitt/hyper-h2/commits{/sha}","git_commits_url":"https://api.github.com/repos/nateprewitt/hyper-h2/git/commits{/sha}","comments_url":"https://api.github.com/repos/nateprewitt/hyper-h2/comments{/number}","issue_comment_url":"https://api.github.com/repos/nateprewitt/hyper-h2/issues/comments{/number}","contents_url":"https://api.github.com/repos/nateprewitt/hyper-h2/contents/{+path}","compare_url":"https://api.github.com/repos/nateprewitt/hyper-h2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nateprewitt/hyper-h2/merges","archive_url":"https://api.github.com/repos/nateprewitt/hyper-h2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nateprewitt/hyper-h2/downloads","issues_url":"https://api.github.com/repos/nateprewitt/hyper-h2/issues{/number}","pulls_url":"https://api.github.com/repos/nateprewitt/hyper-h2/pulls{/number}","milestones_url":"https://api.github.com/repos/nateprewitt/hyper-h2/milestones{/number}","notifications_url":"https://api.github.com/repos/nateprewitt/hyper-h2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nateprewitt/hyper-h2/labels{/name}","releases_url":"https://api.github.com/repos/nateprewitt/hyper-h2/releases{/id}","deployments_url":"https://api.github.com/repos/nateprewitt/hyper-h2/deployments","created_at":"2016-08-31T17:44:31Z","updated_at":"2016-08-31T17:44:32Z","pushed_at":"2016-11-06T04:10:37Z","git_url":"git://github.com/nateprewitt/hyper-h2.git","ssh_url":"git@github.com:nateprewitt/hyper-h2.git","clone_url":"https://github.com/nateprewitt/hyper-h2.git","svn_url":"https://github.com/nateprewitt/hyper-h2","homepage":"http://python-hyper.org/h2/","size":1225,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"python-hyper:master","ref":"master","sha":"d78ff73a5e5b39154f6057b183e17c3ca9b0c7f5","user":{"login":"python-hyper","id":13035907,"avatar_url":"https://avatars.githubusercontent.com/u/13035907?v=3","gravatar_id":"","url":"https://api.github.com/users/python-hyper","html_url":"https://github.com/python-hyper","followers_url":"https://api.github.com/users/python-hyper/followers","following_url":"https://api.github.com/users/python-hyper/following{/other_user}","gists_url":"https://api.github.com/users/python-hyper/gists{/gist_id}","starred_url":"https://api.github.com/users/python-hyper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python-hyper/subscriptions","organizations_url":"https://api.github.com/users/python-hyper/orgs","repos_url":"https://api.github.com/users/python-hyper/repos","events_url":"https://api.github.com/users/python-hyper/events{/privacy}","received_events_url":"https://api.github.com/users/python-hyper/received_events","type":"Organization","site_admin":false},"repo":{"id":37996233,"name":"hyper-h2","full_name":"python-hyper/hyper-h2","owner":{"login":"python-hyper","id":13035907,"avatar_url":"https://avatars.githubusercontent.com/u/13035907?v=3","gravatar_id":"","url":"https://api.github.com/users/python-hyper","html_url":"https://github.com/python-hyper","followers_url":"https://api.github.com/users/python-hyper/followers","following_url":"https://api.github.com/users/python-hyper/following{/other_user}","gists_url":"https://api.github.com/users/python-hyper/gists{/gist_id}","starred_url":"https://api.github.com/users/python-hyper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/python-hyper/subscriptions","organizations_url":"https://api.github.com/users/python-hyper/orgs","repos_url":"https://api.github.com/users/python-hyper/repos","events_url":"https://api.github.com/users/python-hyper/events{/privacy}","received_events_url":"https://api.github.com/users/python-hyper/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/python-hyper/hyper-h2","description":"HTTP/2 State-Machine based protocol implementation","fork":false,"url":"https://api.github.com/repos/python-hyper/hyper-h2","forks_url":"https://api.github.com/repos/python-hyper/hyper-h2/forks","keys_url":"https://api.github.com/repos/python-hyper/hyper-h2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/python-hyper/hyper-h2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/python-hyper/hyper-h2/teams","hooks_url":"https://api.github.com/repos/python-hyper/hyper-h2/hooks","issue_events_url":"https://api.github.com/repos/python-hyper/hyper-h2/issues/events{/number}","events_url":"https://api.github.com/repos/python-hyper/hyper-h2/events","assignees_url":"https://api.github.com/repos/python-hyper/hyper-h2/assignees{/user}","branches_url":"https://api.github.com/repos/python-hyper/hyper-h2/branches{/branch}","tags_url":"https://api.github.com/repos/python-hyper/hyper-h2/tags","blobs_url":"https://api.github.com/repos/python-hyper/hyper-h2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/python-hyper/hyper-h2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/python-hyper/hyper-h2/git/refs{/sha}","trees_url":"https://api.github.com/repos/python-hyper/hyper-h2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/python-hyper/hyper-h2/statuses/{sha}","languages_url":"https://api.github.com/repos/python-hyper/hyper-h2/languages","stargazers_url":"https://api.github.com/repos/python-hyper/hyper-h2/stargazers","contributors_url":"https://api.github.com/repos/python-hyper/hyper-h2/contributors","subscribers_url":"https://api.github.com/repos/python-hyper/hyper-h2/subscribers","subscription_url":"https://api.github.com/repos/python-hyper/hyper-h2/subscription","commits_url":"https://api.github.com/repos/python-hyper/hyper-h2/commits{/sha}","git_commits_url":"https://api.github.com/repos/python-hyper/hyper-h2/git/commits{/sha}","comments_url":"https://api.github.com/repos/python-hyper/hyper-h2/comments{/number}","issue_comment_url":"https://api.github.com/repos/python-hyper/hyper-h2/issues/comments{/number}","contents_url":"https://api.github.com/repos/python-hyper/hyper-h2/contents/{+path}","compare_url":"https://api.github.com/repos/python-hyper/hyper-h2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/python-hyper/hyper-h2/merges","archive_url":"https://api.github.com/repos/python-hyper/hyper-h2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/python-hyper/hyper-h2/downloads","issues_url":"https://api.github.com/repos/python-hyper/hyper-h2/issues{/number}","pulls_url":"https://api.github.com/repos/python-hyper/hyper-h2/pulls{/number}","milestones_url":"https://api.github.com/repos/python-hyper/hyper-h2/milestones{/number}","notifications_url":"https://api.github.com/repos/python-hyper/hyper-h2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/python-hyper/hyper-h2/labels{/name}","releases_url":"https://api.github.com/repos/python-hyper/hyper-h2/releases{/id}","deployments_url":"https://api.github.com/repos/python-hyper/hyper-h2/deployments","created_at":"2015-06-24T16:22:19Z","updated_at":"2016-11-04T11:35:38Z","pushed_at":"2016-11-06T04:10:37Z","git_url":"git://github.com/python-hyper/hyper-h2.git","ssh_url":"git@github.com:python-hyper/hyper-h2.git","clone_url":"https://github.com/python-hyper/hyper-h2.git","svn_url":"https://github.com/python-hyper/hyper-h2","homepage":"http://python-hyper.org/h2/","size":1271,"stargazers_count":201,"watchers_count":201,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":19,"forks":42,"open_issues":19,"watchers":201,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/python-hyper/hyper-h2/pulls/382"},"html":{"href":"https://github.com/python-hyper/hyper-h2/pull/382"},"issue":{"href":"https://api.github.com/repos/python-hyper/hyper-h2/issues/382"},"comments":{"href":"https://api.github.com/repos/python-hyper/hyper-h2/issues/382/comments"},"review_comments":{"href":"https://api.github.com/repos/python-hyper/hyper-h2/pulls/382/comments"},"review_comment":{"href":"https://api.github.com/repos/python-hyper/hyper-h2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/python-hyper/hyper-h2/pulls/382/commits"},"statuses":{"href":"https://api.github.com/repos/python-hyper/hyper-h2/statuses/e07538e84b1ef10ac04064b683ade614ba27c2f3"}}}}
{"actor":{"display_login":"Lukasa"}}