{"action":"created","comment":{"url":"https://api.github.com/repos/libgit2/libgit2/pulls/comments/234441731","pull_request_review_id":176086802,"id":234441731,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDQ0MTczMQ==","diff_hunk":"@@ -1012,11 +1041,24 @@ static int http_action(\n \thttp_subtransport *t = (http_subtransport *)subtransport;\n \tint ret;\n \n-\tif (!stream)\n-\t\treturn -1;\n+\tassert(stream);\n+\n+\t/*\n+\t * Callers should provide a non-NULL url for the first connection\n+\t * to a server.  Subsequent calls should pass a NULL url here to\n+\t * reuse the existing one.\n+\t */\n+\tif (url) {\n+\t\tassert(!t->gitserver_data.host && !t->gitserver_data.port && !t->gitserver_data.path);","path":"src/transports/http.c","position":null,"original_position":157,"commit_id":"948a299f1172970f756ab56c6ed43d52c87b35e2","original_commit_id":"11f5b909a84d4fefab99d5a83e7d0106694ffb68","user":{"login":"ethomson","id":1130014,"node_id":"MDQ6VXNlcjExMzAwMTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1130014?v=4","gravatar_id":"","url":"https://api.github.com/users/ethomson","html_url":"https://github.com/ethomson","followers_url":"https://api.github.com/users/ethomson/followers","following_url":"https://api.github.com/users/ethomson/following{/other_user}","gists_url":"https://api.github.com/users/ethomson/gists{/gist_id}","starred_url":"https://api.github.com/users/ethomson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethomson/subscriptions","organizations_url":"https://api.github.com/users/ethomson/orgs","repos_url":"https://api.github.com/users/ethomson/repos","events_url":"https://api.github.com/users/ethomson/events{/privacy}","received_events_url":"https://api.github.com/users/ethomson/received_events","type":"User","site_admin":false},"body":"This is now outdated per https://github.com/libgit2/libgit2/pull/4880.","created_at":"2018-11-18T12:11:04Z","updated_at":"2018-11-18T12:11:04Z","html_url":"https://github.com/libgit2/libgit2/pull/4870#discussion_r234441731","pull_request_url":"https://api.github.com/repos/libgit2/libgit2/pulls/4870","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/comments/234441731"},"html":{"href":"https://github.com/libgit2/libgit2/pull/4870#discussion_r234441731"},"pull_request":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/4870"}},"in_reply_to_id":230288077},"pull_request":{"url":"https://api.github.com/repos/libgit2/libgit2/pulls/4870","id":226518450,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2NTE4NDUw","html_url":"https://github.com/libgit2/libgit2/pull/4870","diff_url":"https://github.com/libgit2/libgit2/pull/4870.diff","patch_url":"https://github.com/libgit2/libgit2/pull/4870.patch","issue_url":"https://api.github.com/repos/libgit2/libgit2/issues/4870","number":4870,"state":"open","locked":false,"title":"Add builtin proxy support for the http transport","user":{"login":"ethomson","id":1130014,"node_id":"MDQ6VXNlcjExMzAwMTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1130014?v=4","gravatar_id":"","url":"https://api.github.com/users/ethomson","html_url":"https://github.com/ethomson","followers_url":"https://api.github.com/users/ethomson/followers","following_url":"https://api.github.com/users/ethomson/following{/other_user}","gists_url":"https://api.github.com/users/ethomson/gists{/gist_id}","starred_url":"https://api.github.com/users/ethomson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethomson/subscriptions","organizations_url":"https://api.github.com/users/ethomson/orgs","repos_url":"https://api.github.com/users/ethomson/repos","events_url":"https://api.github.com/users/ethomson/events{/privacy}","received_events_url":"https://api.github.com/users/ethomson/received_events","type":"User","site_admin":false},"body":"Provide proxy support for the HTTP transport.\r\n\r\n* When we're using a proxy, we now connect directly to the proxy, instead of trying to connect to the remote (git server).  \r\n* For connections to an HTTP remote, we can simply change the request URL that we send to the proxy to be a fully-qualified URL (eg `GET https://github.com/libgit2/libgit2/...`)\r\n* For connections to an HTTPS remote, we need to request that the proxy build a tunnel to the remote, using the `CONNECT` verb.\r\n  * At that point, we can begin speaking HTTPS to the remote over the socket we've built to the proxy.\r\n  * I've introduce `git_tls_stream_wrap` which will create a TLS stream on top of an existing stream (instead of trying to connect a socket).\r\n\r\nI've also updated our test proxy to support speaking HTTPS, so I've updated the tests to support that as well and introduced a second proxy test pass: one that speaks HTTP to the proxy and one that speaks HTTPS.\r\n\r\nWith our own proxy support, this removes the need for us to use libcurl.  It's been removed from the codebase.\r\n\r\nFixed #4515 #4207","created_at":"2018-10-29T11:05:16Z","updated_at":"2018-11-18T12:11:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44e2b3da3841f0b0fd60562b16838d413c0b15ef","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/libgit2/libgit2/pulls/4870/commits","review_comments_url":"https://api.github.com/repos/libgit2/libgit2/pulls/4870/comments","review_comment_url":"https://api.github.com/repos/libgit2/libgit2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libgit2/libgit2/issues/4870/comments","statuses_url":"https://api.github.com/repos/libgit2/libgit2/statuses/948a299f1172970f756ab56c6ed43d52c87b35e2","head":{"label":"libgit2:ethomson/proxy","ref":"ethomson/proxy","sha":"948a299f1172970f756ab56c6ed43d52c87b35e2","user":{"login":"libgit2","id":394745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NDc0NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/394745?v=4","gravatar_id":"","url":"https://api.github.com/users/libgit2","html_url":"https://github.com/libgit2","followers_url":"https://api.github.com/users/libgit2/followers","following_url":"https://api.github.com/users/libgit2/following{/other_user}","gists_url":"https://api.github.com/users/libgit2/gists{/gist_id}","starred_url":"https://api.github.com/users/libgit2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgit2/subscriptions","organizations_url":"https://api.github.com/users/libgit2/orgs","repos_url":"https://api.github.com/users/libgit2/repos","events_url":"https://api.github.com/users/libgit2/events{/privacy}","received_events_url":"https://api.github.com/users/libgit2/received_events","type":"Organization","site_admin":false},"repo":{"id":901662,"node_id":"MDEwOlJlcG9zaXRvcnk5MDE2NjI=","name":"libgit2","full_name":"libgit2/libgit2","private":false,"owner":{"login":"libgit2","id":394745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NDc0NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/394745?v=4","gravatar_id":"","url":"https://api.github.com/users/libgit2","html_url":"https://github.com/libgit2","followers_url":"https://api.github.com/users/libgit2/followers","following_url":"https://api.github.com/users/libgit2/following{/other_user}","gists_url":"https://api.github.com/users/libgit2/gists{/gist_id}","starred_url":"https://api.github.com/users/libgit2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgit2/subscriptions","organizations_url":"https://api.github.com/users/libgit2/orgs","repos_url":"https://api.github.com/users/libgit2/repos","events_url":"https://api.github.com/users/libgit2/events{/privacy}","received_events_url":"https://api.github.com/users/libgit2/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/libgit2/libgit2","description":"A cross-platform, linkable library implementation of Git that you can use in your application.","fork":false,"url":"https://api.github.com/repos/libgit2/libgit2","forks_url":"https://api.github.com/repos/libgit2/libgit2/forks","keys_url":"https://api.github.com/repos/libgit2/libgit2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libgit2/libgit2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libgit2/libgit2/teams","hooks_url":"https://api.github.com/repos/libgit2/libgit2/hooks","issue_events_url":"https://api.github.com/repos/libgit2/libgit2/issues/events{/number}","events_url":"https://api.github.com/repos/libgit2/libgit2/events","assignees_url":"https://api.github.com/repos/libgit2/libgit2/assignees{/user}","branches_url":"https://api.github.com/repos/libgit2/libgit2/branches{/branch}","tags_url":"https://api.github.com/repos/libgit2/libgit2/tags","blobs_url":"https://api.github.com/repos/libgit2/libgit2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libgit2/libgit2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libgit2/libgit2/git/refs{/sha}","trees_url":"https://api.github.com/repos/libgit2/libgit2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libgit2/libgit2/statuses/{sha}","languages_url":"https://api.github.com/repos/libgit2/libgit2/languages","stargazers_url":"https://api.github.com/repos/libgit2/libgit2/stargazers","contributors_url":"https://api.github.com/repos/libgit2/libgit2/contributors","subscribers_url":"https://api.github.com/repos/libgit2/libgit2/subscribers","subscription_url":"https://api.github.com/repos/libgit2/libgit2/subscription","commits_url":"https://api.github.com/repos/libgit2/libgit2/commits{/sha}","git_commits_url":"https://api.github.com/repos/libgit2/libgit2/git/commits{/sha}","comments_url":"https://api.github.com/repos/libgit2/libgit2/comments{/number}","issue_comment_url":"https://api.github.com/repos/libgit2/libgit2/issues/comments{/number}","contents_url":"https://api.github.com/repos/libgit2/libgit2/contents/{+path}","compare_url":"https://api.github.com/repos/libgit2/libgit2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libgit2/libgit2/merges","archive_url":"https://api.github.com/repos/libgit2/libgit2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libgit2/libgit2/downloads","issues_url":"https://api.github.com/repos/libgit2/libgit2/issues{/number}","pulls_url":"https://api.github.com/repos/libgit2/libgit2/pulls{/number}","milestones_url":"https://api.github.com/repos/libgit2/libgit2/milestones{/number}","notifications_url":"https://api.github.com/repos/libgit2/libgit2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libgit2/libgit2/labels{/name}","releases_url":"https://api.github.com/repos/libgit2/libgit2/releases{/id}","deployments_url":"https://api.github.com/repos/libgit2/libgit2/deployments","created_at":"2010-09-10T16:17:48Z","updated_at":"2018-11-18T04:33:39Z","pushed_at":"2018-11-18T12:08:36Z","git_url":"git://github.com/libgit2/libgit2.git","ssh_url":"git@github.com:libgit2/libgit2.git","clone_url":"https://github.com/libgit2/libgit2.git","svn_url":"https://github.com/libgit2/libgit2","homepage":"https://libgit2.org/","size":41134,"stargazers_count":6709,"watchers_count":6709,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1700,"mirror_url":null,"archived":false,"open_issues_count":253,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1700,"open_issues":253,"watchers":6709,"default_branch":"master"}},"base":{"label":"libgit2:master","ref":"master","sha":"7321cff05df927c8d00755ef21289ec00d125c9c","user":{"login":"libgit2","id":394745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NDc0NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/394745?v=4","gravatar_id":"","url":"https://api.github.com/users/libgit2","html_url":"https://github.com/libgit2","followers_url":"https://api.github.com/users/libgit2/followers","following_url":"https://api.github.com/users/libgit2/following{/other_user}","gists_url":"https://api.github.com/users/libgit2/gists{/gist_id}","starred_url":"https://api.github.com/users/libgit2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgit2/subscriptions","organizations_url":"https://api.github.com/users/libgit2/orgs","repos_url":"https://api.github.com/users/libgit2/repos","events_url":"https://api.github.com/users/libgit2/events{/privacy}","received_events_url":"https://api.github.com/users/libgit2/received_events","type":"Organization","site_admin":false},"repo":{"id":901662,"node_id":"MDEwOlJlcG9zaXRvcnk5MDE2NjI=","name":"libgit2","full_name":"libgit2/libgit2","private":false,"owner":{"login":"libgit2","id":394745,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5NDc0NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/394745?v=4","gravatar_id":"","url":"https://api.github.com/users/libgit2","html_url":"https://github.com/libgit2","followers_url":"https://api.github.com/users/libgit2/followers","following_url":"https://api.github.com/users/libgit2/following{/other_user}","gists_url":"https://api.github.com/users/libgit2/gists{/gist_id}","starred_url":"https://api.github.com/users/libgit2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libgit2/subscriptions","organizations_url":"https://api.github.com/users/libgit2/orgs","repos_url":"https://api.github.com/users/libgit2/repos","events_url":"https://api.github.com/users/libgit2/events{/privacy}","received_events_url":"https://api.github.com/users/libgit2/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/libgit2/libgit2","description":"A cross-platform, linkable library implementation of Git that you can use in your application.","fork":false,"url":"https://api.github.com/repos/libgit2/libgit2","forks_url":"https://api.github.com/repos/libgit2/libgit2/forks","keys_url":"https://api.github.com/repos/libgit2/libgit2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libgit2/libgit2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libgit2/libgit2/teams","hooks_url":"https://api.github.com/repos/libgit2/libgit2/hooks","issue_events_url":"https://api.github.com/repos/libgit2/libgit2/issues/events{/number}","events_url":"https://api.github.com/repos/libgit2/libgit2/events","assignees_url":"https://api.github.com/repos/libgit2/libgit2/assignees{/user}","branches_url":"https://api.github.com/repos/libgit2/libgit2/branches{/branch}","tags_url":"https://api.github.com/repos/libgit2/libgit2/tags","blobs_url":"https://api.github.com/repos/libgit2/libgit2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libgit2/libgit2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libgit2/libgit2/git/refs{/sha}","trees_url":"https://api.github.com/repos/libgit2/libgit2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libgit2/libgit2/statuses/{sha}","languages_url":"https://api.github.com/repos/libgit2/libgit2/languages","stargazers_url":"https://api.github.com/repos/libgit2/libgit2/stargazers","contributors_url":"https://api.github.com/repos/libgit2/libgit2/contributors","subscribers_url":"https://api.github.com/repos/libgit2/libgit2/subscribers","subscription_url":"https://api.github.com/repos/libgit2/libgit2/subscription","commits_url":"https://api.github.com/repos/libgit2/libgit2/commits{/sha}","git_commits_url":"https://api.github.com/repos/libgit2/libgit2/git/commits{/sha}","comments_url":"https://api.github.com/repos/libgit2/libgit2/comments{/number}","issue_comment_url":"https://api.github.com/repos/libgit2/libgit2/issues/comments{/number}","contents_url":"https://api.github.com/repos/libgit2/libgit2/contents/{+path}","compare_url":"https://api.github.com/repos/libgit2/libgit2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libgit2/libgit2/merges","archive_url":"https://api.github.com/repos/libgit2/libgit2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libgit2/libgit2/downloads","issues_url":"https://api.github.com/repos/libgit2/libgit2/issues{/number}","pulls_url":"https://api.github.com/repos/libgit2/libgit2/pulls{/number}","milestones_url":"https://api.github.com/repos/libgit2/libgit2/milestones{/number}","notifications_url":"https://api.github.com/repos/libgit2/libgit2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libgit2/libgit2/labels{/name}","releases_url":"https://api.github.com/repos/libgit2/libgit2/releases{/id}","deployments_url":"https://api.github.com/repos/libgit2/libgit2/deployments","created_at":"2010-09-10T16:17:48Z","updated_at":"2018-11-18T04:33:39Z","pushed_at":"2018-11-18T12:08:36Z","git_url":"git://github.com/libgit2/libgit2.git","ssh_url":"git@github.com:libgit2/libgit2.git","clone_url":"https://github.com/libgit2/libgit2.git","svn_url":"https://github.com/libgit2/libgit2","homepage":"https://libgit2.org/","size":41134,"stargazers_count":6709,"watchers_count":6709,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1700,"mirror_url":null,"archived":false,"open_issues_count":253,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1700,"open_issues":253,"watchers":6709,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/4870"},"html":{"href":"https://github.com/libgit2/libgit2/pull/4870"},"issue":{"href":"https://api.github.com/repos/libgit2/libgit2/issues/4870"},"comments":{"href":"https://api.github.com/repos/libgit2/libgit2/issues/4870/comments"},"review_comments":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/4870/comments"},"review_comment":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libgit2/libgit2/pulls/4870/commits"},"statuses":{"href":"https://api.github.com/repos/libgit2/libgit2/statuses/948a299f1172970f756ab56c6ed43d52c87b35e2"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ethomson"}}