{"action":"created","comment":{"url":"https://api.github.com/repos/github/git-lfs/pulls/comments/41434749","id":41434749,"diff_hunk":"@@ -125,8 +126,15 @@ func Download(oid string) (io.ReadCloser, int64, error) {\n \t\treturn nil, 0, err\n \t}\n \tLogTransfer(\"lfs.data.download\", res)\n+\t\n+\tbuf, _ := ioutil.ReadAll(res.Body)\n+\tbody := myReader{bytes.NewBuffer(buf)}\t","path":"lfs/client.go","position":null,"original_position":14,"commit_id":"a7f79778388753d0cdc3749ee817eeca3a3c1ff2","original_commit_id":"379765440fe2f143b9d5a788981a8f7557b6dcc7","user":{"login":"technoweenie","id":21,"avatar_url":"https://avatars.githubusercontent.com/u/21?v=3","gravatar_id":"","url":"https://api.github.com/users/technoweenie","html_url":"https://github.com/technoweenie","followers_url":"https://api.github.com/users/technoweenie/followers","following_url":"https://api.github.com/users/technoweenie/following{/other_user}","gists_url":"https://api.github.com/users/technoweenie/gists{/gist_id}","starred_url":"https://api.github.com/users/technoweenie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technoweenie/subscriptions","organizations_url":"https://api.github.com/users/technoweenie/orgs","repos_url":"https://api.github.com/users/technoweenie/repos","events_url":"https://api.github.com/users/technoweenie/events{/privacy}","received_events_url":"https://api.github.com/users/technoweenie/received_events","type":"User","site_admin":true},"body":"Each `*http.Client` is designed to be goroutine-safe in an application. Its [Transport](https://golang.org/pkg/net/http/#Transport) has some properties for configuring its keepalive connections. Other than `CancelRequest()` and `CloseIdleConnections()`, it doesn't seem to give much visibility into how it's managing the connections. I wonder if we can just set `MaxIdleConnsPerHost` to 1? That would hurt concurrency for NTLM users, but should force a single connection per host.","created_at":"2015-10-07T19:29:23Z","updated_at":"2015-10-07T19:29:23Z","html_url":"https://github.com/github/git-lfs/pull/714#discussion_r41434749","pull_request_url":"https://api.github.com/repos/github/git-lfs/pulls/714","_links":{"self":{"href":"https://api.github.com/repos/github/git-lfs/pulls/comments/41434749"},"html":{"href":"https://github.com/github/git-lfs/pull/714#discussion_r41434749"},"pull_request":{"href":"https://api.github.com/repos/github/git-lfs/pulls/714"}}},"pull_request":{"url":"https://api.github.com/repos/github/git-lfs/pulls/714","id":46954088,"html_url":"https://github.com/github/git-lfs/pull/714","diff_url":"https://github.com/github/git-lfs/pull/714.diff","patch_url":"https://github.com/github/git-lfs/pull/714.patch","issue_url":"https://api.github.com/repos/github/git-lfs/issues/714","number":714,"state":"open","locked":false,"title":"Add NTLM Auth","user":{"login":"WillHipschman","id":1807809,"avatar_url":"https://avatars.githubusercontent.com/u/1807809?v=3","gravatar_id":"","url":"https://api.github.com/users/WillHipschman","html_url":"https://github.com/WillHipschman","followers_url":"https://api.github.com/users/WillHipschman/followers","following_url":"https://api.github.com/users/WillHipschman/following{/other_user}","gists_url":"https://api.github.com/users/WillHipschman/gists{/gist_id}","starred_url":"https://api.github.com/users/WillHipschman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WillHipschman/subscriptions","organizations_url":"https://api.github.com/users/WillHipschman/orgs","repos_url":"https://api.github.com/users/WillHipschman/repos","events_url":"https://api.github.com/users/WillHipschman/events{/privacy}","received_events_url":"https://api.github.com/users/WillHipschman/received_events","type":"User","site_admin":false},"body":"This a first attempt at adding NTLM auth. It addresss the proposal in #617. Please let me know your thoughts.\r\n\r\nIt uses lfs.{endpoint}.access to toggle NTLM and most ntlm specific logic is in its own class. We store user/pass in the cred helper but could later go get them from AD.\r\n\r\nThings that still need to be done:\r\n\r\n1. Add Tests-I can add unit tests but I don't think migrating the whole test infrastructure to support windows environments should block this.\r\n2. Add documentation.\r\n\r\n","created_at":"2015-10-06T20:34:50Z","updated_at":"2015-10-07T19:29:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c37fefeaedd9f7b0af9596e36e40200bfeac32b3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/github/git-lfs/pulls/714/commits","review_comments_url":"https://api.github.com/repos/github/git-lfs/pulls/714/comments","review_comment_url":"https://api.github.com/repos/github/git-lfs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/github/git-lfs/issues/714/comments","statuses_url":"https://api.github.com/repos/github/git-lfs/statuses/a7f79778388753d0cdc3749ee817eeca3a3c1ff2","head":{"label":"WillHipschman:ntlm","ref":"ntlm","sha":"a7f79778388753d0cdc3749ee817eeca3a3c1ff2","user":{"login":"WillHipschman","id":1807809,"avatar_url":"https://avatars.githubusercontent.com/u/1807809?v=3","gravatar_id":"","url":"https://api.github.com/users/WillHipschman","html_url":"https://github.com/WillHipschman","followers_url":"https://api.github.com/users/WillHipschman/followers","following_url":"https://api.github.com/users/WillHipschman/following{/other_user}","gists_url":"https://api.github.com/users/WillHipschman/gists{/gist_id}","starred_url":"https://api.github.com/users/WillHipschman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WillHipschman/subscriptions","organizations_url":"https://api.github.com/users/WillHipschman/orgs","repos_url":"https://api.github.com/users/WillHipschman/repos","events_url":"https://api.github.com/users/WillHipschman/events{/privacy}","received_events_url":"https://api.github.com/users/WillHipschman/received_events","type":"User","site_admin":false},"repo":{"id":40211886,"name":"git-lfs","full_name":"WillHipschman/git-lfs","owner":{"login":"WillHipschman","id":1807809,"avatar_url":"https://avatars.githubusercontent.com/u/1807809?v=3","gravatar_id":"","url":"https://api.github.com/users/WillHipschman","html_url":"https://github.com/WillHipschman","followers_url":"https://api.github.com/users/WillHipschman/followers","following_url":"https://api.github.com/users/WillHipschman/following{/other_user}","gists_url":"https://api.github.com/users/WillHipschman/gists{/gist_id}","starred_url":"https://api.github.com/users/WillHipschman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WillHipschman/subscriptions","organizations_url":"https://api.github.com/users/WillHipschman/orgs","repos_url":"https://api.github.com/users/WillHipschman/repos","events_url":"https://api.github.com/users/WillHipschman/events{/privacy}","received_events_url":"https://api.github.com/users/WillHipschman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WillHipschman/git-lfs","description":"Git extension for versioning large files","fork":true,"url":"https://api.github.com/repos/WillHipschman/git-lfs","forks_url":"https://api.github.com/repos/WillHipschman/git-lfs/forks","keys_url":"https://api.github.com/repos/WillHipschman/git-lfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WillHipschman/git-lfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WillHipschman/git-lfs/teams","hooks_url":"https://api.github.com/repos/WillHipschman/git-lfs/hooks","issue_events_url":"https://api.github.com/repos/WillHipschman/git-lfs/issues/events{/number}","events_url":"https://api.github.com/repos/WillHipschman/git-lfs/events","assignees_url":"https://api.github.com/repos/WillHipschman/git-lfs/assignees{/user}","branches_url":"https://api.github.com/repos/WillHipschman/git-lfs/branches{/branch}","tags_url":"https://api.github.com/repos/WillHipschman/git-lfs/tags","blobs_url":"https://api.github.com/repos/WillHipschman/git-lfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WillHipschman/git-lfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WillHipschman/git-lfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/WillHipschman/git-lfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WillHipschman/git-lfs/statuses/{sha}","languages_url":"https://api.github.com/repos/WillHipschman/git-lfs/languages","stargazers_url":"https://api.github.com/repos/WillHipschman/git-lfs/stargazers","contributors_url":"https://api.github.com/repos/WillHipschman/git-lfs/contributors","subscribers_url":"https://api.github.com/repos/WillHipschman/git-lfs/subscribers","subscription_url":"https://api.github.com/repos/WillHipschman/git-lfs/subscription","commits_url":"https://api.github.com/repos/WillHipschman/git-lfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/WillHipschman/git-lfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/WillHipschman/git-lfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/WillHipschman/git-lfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/WillHipschman/git-lfs/contents/{+path}","compare_url":"https://api.github.com/repos/WillHipschman/git-lfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WillHipschman/git-lfs/merges","archive_url":"https://api.github.com/repos/WillHipschman/git-lfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WillHipschman/git-lfs/downloads","issues_url":"https://api.github.com/repos/WillHipschman/git-lfs/issues{/number}","pulls_url":"https://api.github.com/repos/WillHipschman/git-lfs/pulls{/number}","milestones_url":"https://api.github.com/repos/WillHipschman/git-lfs/milestones{/number}","notifications_url":"https://api.github.com/repos/WillHipschman/git-lfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WillHipschman/git-lfs/labels{/name}","releases_url":"https://api.github.com/repos/WillHipschman/git-lfs/releases{/id}","created_at":"2015-08-04T22:18:30Z","updated_at":"2015-08-04T22:18:30Z","pushed_at":"2015-10-07T19:23:32Z","git_url":"git://github.com/WillHipschman/git-lfs.git","ssh_url":"git@github.com:WillHipschman/git-lfs.git","clone_url":"https://github.com/WillHipschman/git-lfs.git","svn_url":"https://github.com/WillHipschman/git-lfs","homepage":"https://git-lfs.github.com","size":7308,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"github:master","ref":"master","sha":"f32da15913e838c1f50ae4aca9191a3390541ade","user":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"repo":{"id":13021798,"name":"git-lfs","full_name":"github/git-lfs","owner":{"login":"github","id":9919,"avatar_url":"https://avatars.githubusercontent.com/u/9919?v=3","gravatar_id":"","url":"https://api.github.com/users/github","html_url":"https://github.com/github","followers_url":"https://api.github.com/users/github/followers","following_url":"https://api.github.com/users/github/following{/other_user}","gists_url":"https://api.github.com/users/github/gists{/gist_id}","starred_url":"https://api.github.com/users/github/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github/subscriptions","organizations_url":"https://api.github.com/users/github/orgs","repos_url":"https://api.github.com/users/github/repos","events_url":"https://api.github.com/users/github/events{/privacy}","received_events_url":"https://api.github.com/users/github/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/github/git-lfs","description":"Git extension for versioning large files","fork":false,"url":"https://api.github.com/repos/github/git-lfs","forks_url":"https://api.github.com/repos/github/git-lfs/forks","keys_url":"https://api.github.com/repos/github/git-lfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/github/git-lfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/github/git-lfs/teams","hooks_url":"https://api.github.com/repos/github/git-lfs/hooks","issue_events_url":"https://api.github.com/repos/github/git-lfs/issues/events{/number}","events_url":"https://api.github.com/repos/github/git-lfs/events","assignees_url":"https://api.github.com/repos/github/git-lfs/assignees{/user}","branches_url":"https://api.github.com/repos/github/git-lfs/branches{/branch}","tags_url":"https://api.github.com/repos/github/git-lfs/tags","blobs_url":"https://api.github.com/repos/github/git-lfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/github/git-lfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/github/git-lfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/github/git-lfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/github/git-lfs/statuses/{sha}","languages_url":"https://api.github.com/repos/github/git-lfs/languages","stargazers_url":"https://api.github.com/repos/github/git-lfs/stargazers","contributors_url":"https://api.github.com/repos/github/git-lfs/contributors","subscribers_url":"https://api.github.com/repos/github/git-lfs/subscribers","subscription_url":"https://api.github.com/repos/github/git-lfs/subscription","commits_url":"https://api.github.com/repos/github/git-lfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/github/git-lfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/github/git-lfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/github/git-lfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/github/git-lfs/contents/{+path}","compare_url":"https://api.github.com/repos/github/git-lfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/github/git-lfs/merges","archive_url":"https://api.github.com/repos/github/git-lfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/github/git-lfs/downloads","issues_url":"https://api.github.com/repos/github/git-lfs/issues{/number}","pulls_url":"https://api.github.com/repos/github/git-lfs/pulls{/number}","milestones_url":"https://api.github.com/repos/github/git-lfs/milestones{/number}","notifications_url":"https://api.github.com/repos/github/git-lfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/github/git-lfs/labels{/name}","releases_url":"https://api.github.com/repos/github/git-lfs/releases{/id}","created_at":"2013-09-22T22:03:28Z","updated_at":"2015-10-07T18:37:01Z","pushed_at":"2015-10-07T19:23:33Z","git_url":"git://github.com/github/git-lfs.git","ssh_url":"git@github.com:github/git-lfs.git","clone_url":"https://github.com/github/git-lfs.git","svn_url":"https://github.com/github/git-lfs","homepage":"https://git-lfs.github.com","size":13042,"stargazers_count":2654,"watchers_count":2654,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":196,"mirror_url":null,"open_issues_count":137,"forks":196,"open_issues":137,"watchers":2654,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/github/git-lfs/pulls/714"},"html":{"href":"https://github.com/github/git-lfs/pull/714"},"issue":{"href":"https://api.github.com/repos/github/git-lfs/issues/714"},"comments":{"href":"https://api.github.com/repos/github/git-lfs/issues/714/comments"},"review_comments":{"href":"https://api.github.com/repos/github/git-lfs/pulls/714/comments"},"review_comment":{"href":"https://api.github.com/repos/github/git-lfs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/github/git-lfs/pulls/714/commits"},"statuses":{"href":"https://api.github.com/repos/github/git-lfs/statuses/a7f79778388753d0cdc3749ee817eeca3a3c1ff2"}}}}