{"action":"created","comment":{"url":"https://api.github.com/repos/square/okhttp/pulls/comments/170427648","pull_request_review_id":99118859,"id":170427648,"diff_hunk":"@@ -169,4 +169,30 @@\n       assertEquals(\"Null network interceptor: [null]\", expected.getMessage());\n     }\n   }\n+\n+  @Test(expected = IllegalArgumentException.class)\n+  public void testH2COkHttpClientConstructionFallback() {\n+    // fallbacks are not allowed when using h2c prior knowledge\n+    new OkHttpClient.Builder()\n+            .protocols(Arrays.asList(Protocol.H2C, Protocol.HTTP_1_1))\n+            .build();\n+  }\n+\n+","path":"okhttp-tests/src/test/java/okhttp3/OkHttpClientTest.java","position":13,"original_position":13,"commit_id":"11f464648b1a364ecd8be7dcfc26500f8ecdca60","original_commit_id":"11f464648b1a364ecd8be7dcfc26500f8ecdca60","user":{"login":"yschimke","id":231923,"avatar_url":"https://avatars1.githubusercontent.com/u/231923?v=4","gravatar_id":"","url":"https://api.github.com/users/yschimke","html_url":"https://github.com/yschimke","followers_url":"https://api.github.com/users/yschimke/followers","following_url":"https://api.github.com/users/yschimke/following{/other_user}","gists_url":"https://api.github.com/users/yschimke/gists{/gist_id}","starred_url":"https://api.github.com/users/yschimke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yschimke/subscriptions","organizations_url":"https://api.github.com/users/yschimke/orgs","repos_url":"https://api.github.com/users/yschimke/repos","events_url":"https://api.github.com/users/yschimke/events{/privacy}","received_events_url":"https://api.github.com/users/yschimke/received_events","type":"User","site_admin":false},"body":"not double line","created_at":"2018-02-24T17:58:52Z","updated_at":"2018-02-24T17:58:52Z","html_url":"https://github.com/square/okhttp/pull/3873#discussion_r170427648","pull_request_url":"https://api.github.com/repos/square/okhttp/pulls/3873","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/square/okhttp/pulls/comments/170427648"},"html":{"href":"https://github.com/square/okhttp/pull/3873#discussion_r170427648"},"pull_request":{"href":"https://api.github.com/repos/square/okhttp/pulls/3873"}}},"pull_request":{"url":"https://api.github.com/repos/square/okhttp/pulls/3873","id":170332425,"html_url":"https://github.com/square/okhttp/pull/3873","diff_url":"https://github.com/square/okhttp/pull/3873.diff","patch_url":"https://github.com/square/okhttp/pull/3873.patch","issue_url":"https://api.github.com/repos/square/okhttp/issues/3873","number":3873,"state":"open","locked":false,"title":"gh-1019: quick stab at a prior knowledge approach to h2c","user":{"login":"jpitz","id":690578,"avatar_url":"https://avatars1.githubusercontent.com/u/690578?v=4","gravatar_id":"","url":"https://api.github.com/users/jpitz","html_url":"https://github.com/jpitz","followers_url":"https://api.github.com/users/jpitz/followers","following_url":"https://api.github.com/users/jpitz/following{/other_user}","gists_url":"https://api.github.com/users/jpitz/gists{/gist_id}","starred_url":"https://api.github.com/users/jpitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpitz/subscriptions","organizations_url":"https://api.github.com/users/jpitz/orgs","repos_url":"https://api.github.com/users/jpitz/repos","events_url":"https://api.github.com/users/jpitz/events{/privacy}","received_events_url":"https://api.github.com/users/jpitz/received_events","type":"User","site_admin":false},"body":"Needs a unit test, but I wanted to get the idea out there of how easy this _could_ be.\r\n\r\nAn Address's List<Protocol> comes from the initial configuration. If someone specifies the H2C protocol in that list, then we assume prior knowledge since it requires users to specify the protocol in their configuration.\r\n\r\nI tried to wire a boolean attribute through the constructor chain, but that got really gross. This seemed like an easier approach with a lot fewer changes in code.","created_at":"2018-02-20T22:55:35Z","updated_at":"2018-02-24T17:58:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03841266362a410205f9f6d3ccd1adf570069fc6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/square/okhttp/pulls/3873/commits","review_comments_url":"https://api.github.com/repos/square/okhttp/pulls/3873/comments","review_comment_url":"https://api.github.com/repos/square/okhttp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/square/okhttp/issues/3873/comments","statuses_url":"https://api.github.com/repos/square/okhttp/statuses/11f464648b1a364ecd8be7dcfc26500f8ecdca60","head":{"label":"jpitz:jpitz/gh-1019","ref":"jpitz/gh-1019","sha":"11f464648b1a364ecd8be7dcfc26500f8ecdca60","user":{"login":"jpitz","id":690578,"avatar_url":"https://avatars1.githubusercontent.com/u/690578?v=4","gravatar_id":"","url":"https://api.github.com/users/jpitz","html_url":"https://github.com/jpitz","followers_url":"https://api.github.com/users/jpitz/followers","following_url":"https://api.github.com/users/jpitz/following{/other_user}","gists_url":"https://api.github.com/users/jpitz/gists{/gist_id}","starred_url":"https://api.github.com/users/jpitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpitz/subscriptions","organizations_url":"https://api.github.com/users/jpitz/orgs","repos_url":"https://api.github.com/users/jpitz/repos","events_url":"https://api.github.com/users/jpitz/events{/privacy}","received_events_url":"https://api.github.com/users/jpitz/received_events","type":"User","site_admin":false},"repo":{"id":122231335,"name":"okhttp","full_name":"jpitz/okhttp","owner":{"login":"jpitz","id":690578,"avatar_url":"https://avatars1.githubusercontent.com/u/690578?v=4","gravatar_id":"","url":"https://api.github.com/users/jpitz","html_url":"https://github.com/jpitz","followers_url":"https://api.github.com/users/jpitz/followers","following_url":"https://api.github.com/users/jpitz/following{/other_user}","gists_url":"https://api.github.com/users/jpitz/gists{/gist_id}","starred_url":"https://api.github.com/users/jpitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpitz/subscriptions","organizations_url":"https://api.github.com/users/jpitz/orgs","repos_url":"https://api.github.com/users/jpitz/repos","events_url":"https://api.github.com/users/jpitz/events{/privacy}","received_events_url":"https://api.github.com/users/jpitz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jpitz/okhttp","description":"An HTTP+HTTP/2 client for Android and Java applications.","fork":true,"url":"https://api.github.com/repos/jpitz/okhttp","forks_url":"https://api.github.com/repos/jpitz/okhttp/forks","keys_url":"https://api.github.com/repos/jpitz/okhttp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jpitz/okhttp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jpitz/okhttp/teams","hooks_url":"https://api.github.com/repos/jpitz/okhttp/hooks","issue_events_url":"https://api.github.com/repos/jpitz/okhttp/issues/events{/number}","events_url":"https://api.github.com/repos/jpitz/okhttp/events","assignees_url":"https://api.github.com/repos/jpitz/okhttp/assignees{/user}","branches_url":"https://api.github.com/repos/jpitz/okhttp/branches{/branch}","tags_url":"https://api.github.com/repos/jpitz/okhttp/tags","blobs_url":"https://api.github.com/repos/jpitz/okhttp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jpitz/okhttp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jpitz/okhttp/git/refs{/sha}","trees_url":"https://api.github.com/repos/jpitz/okhttp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jpitz/okhttp/statuses/{sha}","languages_url":"https://api.github.com/repos/jpitz/okhttp/languages","stargazers_url":"https://api.github.com/repos/jpitz/okhttp/stargazers","contributors_url":"https://api.github.com/repos/jpitz/okhttp/contributors","subscribers_url":"https://api.github.com/repos/jpitz/okhttp/subscribers","subscription_url":"https://api.github.com/repos/jpitz/okhttp/subscription","commits_url":"https://api.github.com/repos/jpitz/okhttp/commits{/sha}","git_commits_url":"https://api.github.com/repos/jpitz/okhttp/git/commits{/sha}","comments_url":"https://api.github.com/repos/jpitz/okhttp/comments{/number}","issue_comment_url":"https://api.github.com/repos/jpitz/okhttp/issues/comments{/number}","contents_url":"https://api.github.com/repos/jpitz/okhttp/contents/{+path}","compare_url":"https://api.github.com/repos/jpitz/okhttp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jpitz/okhttp/merges","archive_url":"https://api.github.com/repos/jpitz/okhttp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jpitz/okhttp/downloads","issues_url":"https://api.github.com/repos/jpitz/okhttp/issues{/number}","pulls_url":"https://api.github.com/repos/jpitz/okhttp/pulls{/number}","milestones_url":"https://api.github.com/repos/jpitz/okhttp/milestones{/number}","notifications_url":"https://api.github.com/repos/jpitz/okhttp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jpitz/okhttp/labels{/name}","releases_url":"https://api.github.com/repos/jpitz/okhttp/releases{/id}","deployments_url":"https://api.github.com/repos/jpitz/okhttp/deployments","created_at":"2018-02-20T17:30:29Z","updated_at":"2018-02-20T17:30:33Z","pushed_at":"2018-02-24T14:53:10Z","git_url":"git://github.com/jpitz/okhttp.git","ssh_url":"git@github.com:jpitz/okhttp.git","clone_url":"https://github.com/jpitz/okhttp.git","svn_url":"https://github.com/jpitz/okhttp","homepage":"http://square.github.io/okhttp/","size":16901,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"square:master","ref":"master","sha":"cce5ca8aede3514ac4405e5f908f9f324053cccc","user":{"login":"square","id":82592,"avatar_url":"https://avatars0.githubusercontent.com/u/82592?v=4","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":5152285,"name":"okhttp","full_name":"square/okhttp","owner":{"login":"square","id":82592,"avatar_url":"https://avatars0.githubusercontent.com/u/82592?v=4","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/okhttp","description":"An HTTP+HTTP/2 client for Android and Java applications.","fork":false,"url":"https://api.github.com/repos/square/okhttp","forks_url":"https://api.github.com/repos/square/okhttp/forks","keys_url":"https://api.github.com/repos/square/okhttp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/okhttp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/okhttp/teams","hooks_url":"https://api.github.com/repos/square/okhttp/hooks","issue_events_url":"https://api.github.com/repos/square/okhttp/issues/events{/number}","events_url":"https://api.github.com/repos/square/okhttp/events","assignees_url":"https://api.github.com/repos/square/okhttp/assignees{/user}","branches_url":"https://api.github.com/repos/square/okhttp/branches{/branch}","tags_url":"https://api.github.com/repos/square/okhttp/tags","blobs_url":"https://api.github.com/repos/square/okhttp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/okhttp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/okhttp/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/okhttp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/okhttp/statuses/{sha}","languages_url":"https://api.github.com/repos/square/okhttp/languages","stargazers_url":"https://api.github.com/repos/square/okhttp/stargazers","contributors_url":"https://api.github.com/repos/square/okhttp/contributors","subscribers_url":"https://api.github.com/repos/square/okhttp/subscribers","subscription_url":"https://api.github.com/repos/square/okhttp/subscription","commits_url":"https://api.github.com/repos/square/okhttp/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/okhttp/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/okhttp/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/okhttp/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/okhttp/contents/{+path}","compare_url":"https://api.github.com/repos/square/okhttp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/okhttp/merges","archive_url":"https://api.github.com/repos/square/okhttp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/okhttp/downloads","issues_url":"https://api.github.com/repos/square/okhttp/issues{/number}","pulls_url":"https://api.github.com/repos/square/okhttp/pulls{/number}","milestones_url":"https://api.github.com/repos/square/okhttp/milestones{/number}","notifications_url":"https://api.github.com/repos/square/okhttp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/okhttp/labels{/name}","releases_url":"https://api.github.com/repos/square/okhttp/releases{/id}","deployments_url":"https://api.github.com/repos/square/okhttp/deployments","created_at":"2012-07-23T13:42:55Z","updated_at":"2018-02-24T13:54:47Z","pushed_at":"2018-02-24T15:01:26Z","git_url":"git://github.com/square/okhttp.git","ssh_url":"git@github.com:square/okhttp.git","clone_url":"https://github.com/square/okhttp.git","svn_url":"https://github.com/square/okhttp","homepage":"http://square.github.io/okhttp/","size":16863,"stargazers_count":25144,"watchers_count":25144,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5894,"mirror_url":null,"archived":false,"open_issues_count":104,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":5894,"open_issues":104,"watchers":25144,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/okhttp/pulls/3873"},"html":{"href":"https://github.com/square/okhttp/pull/3873"},"issue":{"href":"https://api.github.com/repos/square/okhttp/issues/3873"},"comments":{"href":"https://api.github.com/repos/square/okhttp/issues/3873/comments"},"review_comments":{"href":"https://api.github.com/repos/square/okhttp/pulls/3873/comments"},"review_comment":{"href":"https://api.github.com/repos/square/okhttp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/square/okhttp/pulls/3873/commits"},"statuses":{"href":"https://api.github.com/repos/square/okhttp/statuses/11f464648b1a364ecd8be7dcfc26500f8ecdca60"}},"author_association":"NONE"}}
{"actor":{"display_login":"yschimke"}}