{"action":"created","comment":{"url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/pulls/comments/29096795","id":29096795,"diff_hunk":"@@ -196,18 +196,33 @@ public static int NumFileUploadParts(FileInfo file)\n         }\n \n         private class BSWebClient : WebClient\n-\t\t{\n-\t\t\t//TODO: Doesnt seem right? Need refactor?\n-\t\t\t// const int CONNECTION_LIMIT = 16;\n-\t\t\tprotected override WebRequest GetWebRequest(Uri address)\n-\t\t\t{\n-\t\t\t\tvar request = base.GetWebRequest(address) as HttpWebRequest;\n-\n-\t\t\t\tif (request != null && request.ServicePoint.ConnectionLimit < 20)\n-\t\t\t\t\trequest.ServicePoint.ConnectionLimit = 10000;  //Note: Is this changing global value?\n-\n-\t\t\t\treturn request;\n-\t\t\t}\n-\t\t}\n+        {\n+            //TODO: Doesnt seem right? Need refactoring?\n+            // const int CONNECTION_LIMIT = 16;\n+            protected override WebRequest GetWebRequest(Uri address)\n+            {\n+                var request = base.GetWebRequest(address) as HttpWebRequest;\n+\n+                if (request != null && request.ServicePoint.ConnectionLimit < 20)\n+                    request.ServicePoint.ConnectionLimit = 10000;  //Note: Is this changing global value?\n+\n+                // Workaround to support slow internet connections.\n+                // On very slow internet connections (specifically between the client and the BaseSpace API server), \n+                // multi-part file uploads tend to fail due to a request timeout.\n+                if (request != null)\n+                {\n+                    // Set the timeout to 10 min (vs default 100 sec). \n+                    // This setting was confirmed to work for the minimum upload part size of 5 MB\n+                    // on connections with sustainable upload speeds of 20 KB/s and higher.\n+                    // Technically, this timeout should be tied to the configured part size, \n+                    // but cursory tests demonstrated that for larger part sizes greater timeouts\n+                    // start inducing errors (500 in particular) on the server side.\n+                    request.Timeout = 600000;","path":"BaseSpace.SDK/Infrastructure/FileUpload.cs","position":125,"original_position":125,"commit_id":"50b27e013a11c634b97f4b611aa021bf71152fae","original_commit_id":"50b27e013a11c634b97f4b611aa021bf71152fae","user":{"login":"brunzefb","id":462831,"avatar_url":"https://avatars.githubusercontent.com/u/462831?v=3","gravatar_id":"","url":"https://api.github.com/users/brunzefb","html_url":"https://github.com/brunzefb","followers_url":"https://api.github.com/users/brunzefb/followers","following_url":"https://api.github.com/users/brunzefb/following{/other_user}","gists_url":"https://api.github.com/users/brunzefb/gists{/gist_id}","starred_url":"https://api.github.com/users/brunzefb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunzefb/subscriptions","organizations_url":"https://api.github.com/users/brunzefb/orgs","repos_url":"https://api.github.com/users/brunzefb/repos","events_url":"https://api.github.com/users/brunzefb/events{/privacy}","received_events_url":"https://api.github.com/users/brunzefb/received_events","type":"User","site_admin":false},"body":"The pull request was not intended to be merged directly, just the ideas for\nthe change.  We fixed our fork of the SDK (fixing the slow uploads from\nAsia) in this manner, but there is probably a better way to fix it.  I´m\njuggling too many other things to be able to help.\n\nOn Fri, Apr 24, 2015 at 4:50 PM, adamnation <notifications@github.com>\nwrote:\n\n> In BaseSpace.SDK/Infrastructure/FileUpload.cs\n> <https://github.com/basespace/basespace-csharp-sdk/pull/39#discussion_r29084624>\n> :\n>\n> > +\n> > +                if (request != null && request.ServicePoint.ConnectionLimit < 20)\n> > +                    request.ServicePoint.ConnectionLimit = 10000;  //Note: Is this changing global value?\n> > +\n> > +                // Workaround to support slow internet connections.\n> > +                // On very slow internet connections (specifically between the client and the BaseSpace API server),\n> > +                // multi-part file uploads tend to fail due to a request timeout.\n> > +                if (request != null)\n> > +                {\n> > +                    // Set the timeout to 10 min (vs default 100 sec).\n> > +                    // This setting was confirmed to work for the minimum upload part size of 5 MB\n> > +                    // on connections with sustainable upload speeds of 20 KB/s and higher.\n> > +                    // Technically, this timeout should be tied to the configured part size,\n> > +                    // but cursory tests demonstrated that for larger part sizes greater timeouts\n> > +                    // start inducing errors (500 in particular) on the server side.\n> > +                    request.Timeout = 600000;\n>\n> can you make this change into a different pull request? I feel it is\n> unrelated to sharing api\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/basespace/basespace-csharp-sdk/pull/39/files#r29084624>\n> .\n>\n","created_at":"2015-04-25T02:05:24Z","updated_at":"2015-04-25T02:05:24Z","html_url":"https://github.com/basespace/basespace-csharp-sdk/pull/39#discussion_r29096795","pull_request_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/pulls/39","_links":{"self":{"href":"https://api.github.com/repos/basespace/basespace-csharp-sdk/pulls/comments/29096795"},"html":{"href":"https://github.com/basespace/basespace-csharp-sdk/pull/39#discussion_r29096795"},"pull_request":{"href":"https://api.github.com/repos/basespace/basespace-csharp-sdk/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/pulls/39","id":30558985,"html_url":"https://github.com/basespace/basespace-csharp-sdk/pull/39","diff_url":"https://github.com/basespace/basespace-csharp-sdk/pull/39.diff","patch_url":"https://github.com/basespace/basespace-csharp-sdk/pull/39.patch","issue_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/issues/39","number":39,"state":"open","locked":false,"title":"Share Project support for BaseSpace SDK","user":{"login":"brunzefb","id":462831,"avatar_url":"https://avatars.githubusercontent.com/u/462831?v=3","gravatar_id":"","url":"https://api.github.com/users/brunzefb","html_url":"https://github.com/brunzefb","followers_url":"https://api.github.com/users/brunzefb/followers","following_url":"https://api.github.com/users/brunzefb/following{/other_user}","gists_url":"https://api.github.com/users/brunzefb/gists{/gist_id}","starred_url":"https://api.github.com/users/brunzefb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunzefb/subscriptions","organizations_url":"https://api.github.com/users/brunzefb/orgs","repos_url":"https://api.github.com/users/brunzefb/repos","events_url":"https://api.github.com/users/brunzefb/events{/privacy}","received_events_url":"https://api.github.com/users/brunzefb/received_events","type":"User","site_admin":false},"body":"Don't merge this as is - the actual changes are in the new files at the bottom. ","created_at":"2015-03-05T14:06:40Z","updated_at":"2015-04-25T02:05:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a15530a7b9b8c2f841a2b7d0efca2454f9dcd459","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/pulls/39/commits","review_comments_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/pulls/39/comments","review_comment_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/issues/39/comments","statuses_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/statuses/50b27e013a11c634b97f4b611aa021bf71152fae","head":{"label":"brunzefb:ShareProject","ref":"ShareProject","sha":"50b27e013a11c634b97f4b611aa021bf71152fae","user":{"login":"brunzefb","id":462831,"avatar_url":"https://avatars.githubusercontent.com/u/462831?v=3","gravatar_id":"","url":"https://api.github.com/users/brunzefb","html_url":"https://github.com/brunzefb","followers_url":"https://api.github.com/users/brunzefb/followers","following_url":"https://api.github.com/users/brunzefb/following{/other_user}","gists_url":"https://api.github.com/users/brunzefb/gists{/gist_id}","starred_url":"https://api.github.com/users/brunzefb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunzefb/subscriptions","organizations_url":"https://api.github.com/users/brunzefb/orgs","repos_url":"https://api.github.com/users/brunzefb/repos","events_url":"https://api.github.com/users/brunzefb/events{/privacy}","received_events_url":"https://api.github.com/users/brunzefb/received_events","type":"User","site_admin":false},"repo":{"id":22442407,"name":"basespace-csharp-sdk","full_name":"brunzefb/basespace-csharp-sdk","owner":{"login":"brunzefb","id":462831,"avatar_url":"https://avatars.githubusercontent.com/u/462831?v=3","gravatar_id":"","url":"https://api.github.com/users/brunzefb","html_url":"https://github.com/brunzefb","followers_url":"https://api.github.com/users/brunzefb/followers","following_url":"https://api.github.com/users/brunzefb/following{/other_user}","gists_url":"https://api.github.com/users/brunzefb/gists{/gist_id}","starred_url":"https://api.github.com/users/brunzefb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunzefb/subscriptions","organizations_url":"https://api.github.com/users/brunzefb/orgs","repos_url":"https://api.github.com/users/brunzefb/repos","events_url":"https://api.github.com/users/brunzefb/events{/privacy}","received_events_url":"https://api.github.com/users/brunzefb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brunzefb/basespace-csharp-sdk","description":"Small extension to support current user app sessions","fork":true,"url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk","forks_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/forks","keys_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/teams","hooks_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/hooks","issue_events_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/events","assignees_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/tags","blobs_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/languages","stargazers_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/stargazers","contributors_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/contributors","subscribers_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/subscribers","subscription_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/subscription","commits_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/merges","archive_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/downloads","issues_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/labels{/name}","releases_url":"https://api.github.com/repos/brunzefb/basespace-csharp-sdk/releases{/id}","created_at":"2014-07-30T19:53:38Z","updated_at":"2015-02-10T03:04:37Z","pushed_at":"2015-03-05T13:59:49Z","git_url":"git://github.com/brunzefb/basespace-csharp-sdk.git","ssh_url":"git@github.com:brunzefb/basespace-csharp-sdk.git","clone_url":"https://github.com/brunzefb/basespace-csharp-sdk.git","svn_url":"https://github.com/brunzefb/basespace-csharp-sdk","homepage":"","size":8574,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"basespace:develop","ref":"develop","sha":"08877e0f249dbf844fe38bb2e5f70fe4a2216fcb","user":{"login":"basespace","id":1480294,"avatar_url":"https://avatars.githubusercontent.com/u/1480294?v=3","gravatar_id":"","url":"https://api.github.com/users/basespace","html_url":"https://github.com/basespace","followers_url":"https://api.github.com/users/basespace/followers","following_url":"https://api.github.com/users/basespace/following{/other_user}","gists_url":"https://api.github.com/users/basespace/gists{/gist_id}","starred_url":"https://api.github.com/users/basespace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basespace/subscriptions","organizations_url":"https://api.github.com/users/basespace/orgs","repos_url":"https://api.github.com/users/basespace/repos","events_url":"https://api.github.com/users/basespace/events{/privacy}","received_events_url":"https://api.github.com/users/basespace/received_events","type":"Organization","site_admin":false},"repo":{"id":6879069,"name":"basespace-csharp-sdk","full_name":"basespace/basespace-csharp-sdk","owner":{"login":"basespace","id":1480294,"avatar_url":"https://avatars.githubusercontent.com/u/1480294?v=3","gravatar_id":"","url":"https://api.github.com/users/basespace","html_url":"https://github.com/basespace","followers_url":"https://api.github.com/users/basespace/followers","following_url":"https://api.github.com/users/basespace/following{/other_user}","gists_url":"https://api.github.com/users/basespace/gists{/gist_id}","starred_url":"https://api.github.com/users/basespace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basespace/subscriptions","organizations_url":"https://api.github.com/users/basespace/orgs","repos_url":"https://api.github.com/users/basespace/repos","events_url":"https://api.github.com/users/basespace/events{/privacy}","received_events_url":"https://api.github.com/users/basespace/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/basespace/basespace-csharp-sdk","description":"","fork":false,"url":"https://api.github.com/repos/basespace/basespace-csharp-sdk","forks_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/forks","keys_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/teams","hooks_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/hooks","issue_events_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/events","assignees_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/tags","blobs_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/languages","stargazers_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/stargazers","contributors_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/contributors","subscribers_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/subscribers","subscription_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/subscription","commits_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/merges","archive_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/downloads","issues_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/labels{/name}","releases_url":"https://api.github.com/repos/basespace/basespace-csharp-sdk/releases{/id}","created_at":"2012-11-27T07:15:30Z","updated_at":"2015-04-03T18:51:57Z","pushed_at":"2015-04-05T20:10:56Z","git_url":"git://github.com/basespace/basespace-csharp-sdk.git","ssh_url":"git@github.com:basespace/basespace-csharp-sdk.git","clone_url":"https://github.com/basespace/basespace-csharp-sdk.git","svn_url":"https://github.com/basespace/basespace-csharp-sdk","homepage":null,"size":9995,"stargazers_count":4,"watchers_count":4,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":5,"forks":3,"open_issues":5,"watchers":4,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/basespace/basespace-csharp-sdk/pulls/39"},"html":{"href":"https://github.com/basespace/basespace-csharp-sdk/pull/39"},"issue":{"href":"https://api.github.com/repos/basespace/basespace-csharp-sdk/issues/39"},"comments":{"href":"https://api.github.com/repos/basespace/basespace-csharp-sdk/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/basespace/basespace-csharp-sdk/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/basespace/basespace-csharp-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/basespace/basespace-csharp-sdk/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/basespace/basespace-csharp-sdk/statuses/50b27e013a11c634b97f4b611aa021bf71152fae"}}}}