GitHub PullRequestReviewCommentEvent at 2014-09-11 05:35:27
Repository: gunicorn
Actor: tilgovi
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/benoitc/gunicorn/pulls/comments/17404869","id":17404869,"diff_hunk":"@@ -271,6 +271,7 @@ def set_non_blocking(fd):\n \n def close(sock):\n     try:\n+        sock.shutdown(socket.SHUT_WR)","path":"gunicorn/util.py","position":4,"original_position":4,"commit_id":"2e5150e07b337734652e2dbc77179b8a7bf9d871","original_commit_id":"2e5150e07b337734652e2dbc77179b8a7bf9d871","user":{"login":"tilgovi","id":20818,"avatar_url":"https://avatars.githubusercontent.com/u/20818?v=2","gravatar_id":"097005ba3431bda404fcc27976aa3150","url":"https://api.github.com/users/tilgovi","html_url":"https://github.com/tilgovi","followers_url":"https://api.github.com/users/tilgovi/followers","following_url":"https://api.github.com/users/tilgovi/following{/other_user}","gists_url":"https://api.github.com/users/tilgovi/gists{/gist_id}","starred_url":"https://api.github.com/users/tilgovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilgovi/subscriptions","organizations_url":"https://api.github.com/users/tilgovi/orgs","repos_url":"https://api.github.com/users/tilgovi/repos","events_url":"https://api.github.com/users/tilgovi/events{/privacy}","received_events_url":"https://api.github.com/users/tilgovi/received_events","type":"User","site_admin":false},"body":"I think if we do this we will have to have a linger pool somewhere and\r\nselect on it. If we get back readable but zero bytes we close. I don't\r\nthink it is a problem if we don't close immediately, especially if we allow\r\noptions for configuring this behavior.\r\nOn Sep 9, 2014 12:04 AM, \"Benoit Chesneau\" <notifications@github.com> wrote:\r\n\r\n> In gunicorn/util.py:\r\n>\r\n> > @@ -271,6 +271,7 @@ def set_non_blocking(fd):\r\n> >\r\n> >  def close(sock):\r\n> >      try:\r\n> > +        sock.shutdown(socket.SHUT_WR)\r\n>\r\n> yeah, the only problem I see is how to handle the normal case: all have\r\n> been received then we close. In that case we don't need to wait for the\r\n> final EOF since it will block.\r\n>\r\n> —\r\n> Reply to this email directly or view it on GitHub\r\n> <https://github.com/benoitc/gunicorn/pull/874/files#r17284959>.\r\n>","created_at":"2014-09-11T05:35:27Z","updated_at":"2014-09-11T05:35:27Z","html_url":"https://github.com/benoitc/gunicorn/pull/874#discussion_r17404869","pull_request_url":"https://api.github.com/repos/benoitc/gunicorn/pulls/874","_links":{"self":{"href":"https://api.github.com/repos/benoitc/gunicorn/pulls/comments/17404869"},"html":{"href":"https://github.com/benoitc/gunicorn/pull/874#discussion_r17404869"},"pull_request":{"href":"https://api.github.com/repos/benoitc/gunicorn/pulls/874"}}},"pull_request":{"url":"https://api.github.com/repos/benoitc/gunicorn/pulls/874","id":20843780,"html_url":"https://github.com/benoitc/gunicorn/pull/874","diff_url":"https://github.com/benoitc/gunicorn/pull/874.diff","patch_url":"https://github.com/benoitc/gunicorn/pull/874.patch","issue_url":"https://api.github.com/repos/benoitc/gunicorn/issues/874","number":874,"state":"open","locked":false,"title":"Shutdown socket writes before close","user":{"login":"tilgovi","id":20818,"avatar_url":"https://avatars.githubusercontent.com/u/20818?v=2","gravatar_id":"097005ba3431bda404fcc27976aa3150","url":"https://api.github.com/users/tilgovi","html_url":"https://github.com/tilgovi","followers_url":"https://api.github.com/users/tilgovi/followers","following_url":"https://api.github.com/users/tilgovi/following{/other_user}","gists_url":"https://api.github.com/users/tilgovi/gists{/gist_id}","starred_url":"https://api.github.com/users/tilgovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilgovi/subscriptions","organizations_url":"https://api.github.com/users/tilgovi/orgs","repos_url":"https://api.github.com/users/tilgovi/repos","events_url":"https://api.github.com/users/tilgovi/events{/privacy}","received_events_url":"https://api.github.com/users/tilgovi/received_events","type":"User","site_admin":false},"body":"Calling shutdown(2) with SHUT_WR before close(2) ensures that a FIN\r\npacket is sent before any RST packet. Doing so ensures that clients\r\nand proxies get a clean shutdown signal when the server terminates the\r\nconnection while an upload is pending.\r\n\r\nFix #872","created_at":"2014-09-06T01:41:44Z","updated_at":"2014-09-11T05:35:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8eb96830010c12c36da7446ae4bceca18eda717","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/benoitc/gunicorn/pulls/874/commits","review_comments_url":"https://api.github.com/repos/benoitc/gunicorn/pulls/874/comments","review_comment_url":"https://api.github.com/repos/benoitc/gunicorn/pulls/comments/{number}","comments_url":"https://api.github.com/repos/benoitc/gunicorn/issues/874/comments","statuses_url":"https://api.github.com/repos/benoitc/gunicorn/statuses/2e5150e07b337734652e2dbc77179b8a7bf9d871","head":{"label":"benoitc:872-shutdown-on-close","ref":"872-shutdown-on-close","sha":"2e5150e07b337734652e2dbc77179b8a7bf9d871","user":{"login":"benoitc","id":14498,"avatar_url":"https://avatars.githubusercontent.com/u/14498?v=2","gravatar_id":"f04edc7cb2099745e5413c754d3d22f5","url":"https://api.github.com/users/benoitc","html_url":"https://github.com/benoitc","followers_url":"https://api.github.com/users/benoitc/followers","following_url":"https://api.github.com/users/benoitc/following{/other_user}","gists_url":"https://api.github.com/users/benoitc/gists{/gist_id}","starred_url":"https://api.github.com/users/benoitc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benoitc/subscriptions","organizations_url":"https://api.github.com/users/benoitc/orgs","repos_url":"https://api.github.com/users/benoitc/repos","events_url":"https://api.github.com/users/benoitc/events{/privacy}","received_events_url":"https://api.github.com/users/benoitc/received_events","type":"User","site_admin":false},"repo":{"id":390510,"name":"gunicorn","full_name":"benoitc/gunicorn","owner":{"login":"benoitc","id":14498,"avatar_url":"https://avatars.githubusercontent.com/u/14498?v=2","gravatar_id":"f04edc7cb2099745e5413c754d3d22f5","url":"https://api.github.com/users/benoitc","html_url":"https://github.com/benoitc","followers_url":"https://api.github.com/users/benoitc/followers","following_url":"https://api.github.com/users/benoitc/following{/other_user}","gists_url":"https://api.github.com/users/benoitc/gists{/gist_id}","starred_url":"https://api.github.com/users/benoitc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benoitc/subscriptions","organizations_url":"https://api.github.com/users/benoitc/orgs","repos_url":"https://api.github.com/users/benoitc/repos","events_url":"https://api.github.com/users/benoitc/events{/privacy}","received_events_url":"https://api.github.com/users/benoitc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benoitc/gunicorn","description":"gunicorn 'Green Unicorn' is a WSGI HTTP Server for UNIX, fast clients and sleepy applications.","fork":false,"url":"https://api.github.com/repos/benoitc/gunicorn","forks_url":"https://api.github.com/repos/benoitc/gunicorn/forks","keys_url":"https://api.github.com/repos/benoitc/gunicorn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benoitc/gunicorn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benoitc/gunicorn/teams","hooks_url":"https://api.github.com/repos/benoitc/gunicorn/hooks","issue_events_url":"https://api.github.com/repos/benoitc/gunicorn/issues/events{/number}","events_url":"https://api.github.com/repos/benoitc/gunicorn/events","assignees_url":"https://api.github.com/repos/benoitc/gunicorn/assignees{/user}","branches_url":"https://api.github.com/repos/benoitc/gunicorn/branches{/branch}","tags_url":"https://api.github.com/repos/benoitc/gunicorn/tags","blobs_url":"https://api.github.com/repos/benoitc/gunicorn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benoitc/gunicorn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benoitc/gunicorn/git/refs{/sha}","trees_url":"https://api.github.com/repos/benoitc/gunicorn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benoitc/gunicorn/statuses/{sha}","languages_url":"https://api.github.com/repos/benoitc/gunicorn/languages","stargazers_url":"https://api.github.com/repos/benoitc/gunicorn/stargazers","contributors_url":"https://api.github.com/repos/benoitc/gunicorn/contributors","subscribers_url":"https://api.github.com/repos/benoitc/gunicorn/subscribers","subscription_url":"https://api.github.com/repos/benoitc/gunicorn/subscription","commits_url":"https://api.github.com/repos/benoitc/gunicorn/commits{/sha}","git_commits_url":"https://api.github.com/repos/benoitc/gunicorn/git/commits{/sha}","comments_url":"https://api.github.com/repos/benoitc/gunicorn/comments{/number}","issue_comment_url":"https://api.github.com/repos/benoitc/gunicorn/issues/comments/{number}","contents_url":"https://api.github.com/repos/benoitc/gunicorn/contents/{+path}","compare_url":"https://api.github.com/repos/benoitc/gunicorn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benoitc/gunicorn/merges","archive_url":"https://api.github.com/repos/benoitc/gunicorn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benoitc/gunicorn/downloads","issues_url":"https://api.github.com/repos/benoitc/gunicorn/issues{/number}","pulls_url":"https://api.github.com/repos/benoitc/gunicorn/pulls{/number}","milestones_url":"https://api.github.com/repos/benoitc/gunicorn/milestones{/number}","notifications_url":"https://api.github.com/repos/benoitc/gunicorn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benoitc/gunicorn/labels{/name}","releases_url":"https://api.github.com/repos/benoitc/gunicorn/releases{/id}","created_at":"2009-11-30T18:18:08Z","updated_at":"2014-09-10T10:09:32Z","pushed_at":"2014-09-11T01:28:38Z","git_url":"git://github.com/benoitc/gunicorn.git","ssh_url":"git@github.com:benoitc/gunicorn.git","clone_url":"https://github.com/benoitc/gunicorn.git","svn_url":"https://github.com/benoitc/gunicorn","homepage":"http://www.gunicorn.org","size":11805,"stargazers_count":1988,"watchers_count":1988,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":401,"mirror_url":null,"open_issues_count":47,"forks":401,"open_issues":47,"watchers":1988,"default_branch":"master"}},"base":{"label":"benoitc:master","ref":"master","sha":"6fe928077ca89add6450659cd913e358ae635867","user":{"login":"benoitc","id":14498,"avatar_url":"https://avatars.githubusercontent.com/u/14498?v=2","gravatar_id":"f04edc7cb2099745e5413c754d3d22f5","url":"https://api.github.com/users/benoitc","html_url":"https://github.com/benoitc","followers_url":"https://api.github.com/users/benoitc/followers","following_url":"https://api.github.com/users/benoitc/following{/other_user}","gists_url":"https://api.github.com/users/benoitc/gists{/gist_id}","starred_url":"https://api.github.com/users/benoitc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benoitc/subscriptions","organizations_url":"https://api.github.com/users/benoitc/orgs","repos_url":"https://api.github.com/users/benoitc/repos","events_url":"https://api.github.com/users/benoitc/events{/privacy}","received_events_url":"https://api.github.com/users/benoitc/received_events","type":"User","site_admin":false},"repo":{"id":390510,"name":"gunicorn","full_name":"benoitc/gunicorn","owner":{"login":"benoitc","id":14498,"avatar_url":"https://avatars.githubusercontent.com/u/14498?v=2","gravatar_id":"f04edc7cb2099745e5413c754d3d22f5","url":"https://api.github.com/users/benoitc","html_url":"https://github.com/benoitc","followers_url":"https://api.github.com/users/benoitc/followers","following_url":"https://api.github.com/users/benoitc/following{/other_user}","gists_url":"https://api.github.com/users/benoitc/gists{/gist_id}","starred_url":"https://api.github.com/users/benoitc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benoitc/subscriptions","organizations_url":"https://api.github.com/users/benoitc/orgs","repos_url":"https://api.github.com/users/benoitc/repos","events_url":"https://api.github.com/users/benoitc/events{/privacy}","received_events_url":"https://api.github.com/users/benoitc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benoitc/gunicorn","description":"gunicorn 'Green Unicorn' is a WSGI HTTP Server for UNIX, fast clients and sleepy applications.","fork":false,"url":"https://api.github.com/repos/benoitc/gunicorn","forks_url":"https://api.github.com/repos/benoitc/gunicorn/forks","keys_url":"https://api.github.com/repos/benoitc/gunicorn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benoitc/gunicorn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benoitc/gunicorn/teams","hooks_url":"https://api.github.com/repos/benoitc/gunicorn/hooks","issue_events_url":"https://api.github.com/repos/benoitc/gunicorn/issues/events{/number}","events_url":"https://api.github.com/repos/benoitc/gunicorn/events","assignees_url":"https://api.github.com/repos/benoitc/gunicorn/assignees{/user}","branches_url":"https://api.github.com/repos/benoitc/gunicorn/branches{/branch}","tags_url":"https://api.github.com/repos/benoitc/gunicorn/tags","blobs_url":"https://api.github.com/repos/benoitc/gunicorn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benoitc/gunicorn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benoitc/gunicorn/git/refs{/sha}","trees_url":"https://api.github.com/repos/benoitc/gunicorn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benoitc/gunicorn/statuses/{sha}","languages_url":"https://api.github.com/repos/benoitc/gunicorn/languages","stargazers_url":"https://api.github.com/repos/benoitc/gunicorn/stargazers","contributors_url":"https://api.github.com/repos/benoitc/gunicorn/contributors","subscribers_url":"https://api.github.com/repos/benoitc/gunicorn/subscribers","subscription_url":"https://api.github.com/repos/benoitc/gunicorn/subscription","commits_url":"https://api.github.com/repos/benoitc/gunicorn/commits{/sha}","git_commits_url":"https://api.github.com/repos/benoitc/gunicorn/git/commits{/sha}","comments_url":"https://api.github.com/repos/benoitc/gunicorn/comments{/number}","issue_comment_url":"https://api.github.com/repos/benoitc/gunicorn/issues/comments/{number}","contents_url":"https://api.github.com/repos/benoitc/gunicorn/contents/{+path}","compare_url":"https://api.github.com/repos/benoitc/gunicorn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benoitc/gunicorn/merges","archive_url":"https://api.github.com/repos/benoitc/gunicorn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benoitc/gunicorn/downloads","issues_url":"https://api.github.com/repos/benoitc/gunicorn/issues{/number}","pulls_url":"https://api.github.com/repos/benoitc/gunicorn/pulls{/number}","milestones_url":"https://api.github.com/repos/benoitc/gunicorn/milestones{/number}","notifications_url":"https://api.github.com/repos/benoitc/gunicorn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benoitc/gunicorn/labels{/name}","releases_url":"https://api.github.com/repos/benoitc/gunicorn/releases{/id}","created_at":"2009-11-30T18:18:08Z","updated_at":"2014-09-10T10:09:32Z","pushed_at":"2014-09-11T01:28:38Z","git_url":"git://github.com/benoitc/gunicorn.git","ssh_url":"git@github.com:benoitc/gunicorn.git","clone_url":"https://github.com/benoitc/gunicorn.git","svn_url":"https://github.com/benoitc/gunicorn","homepage":"http://www.gunicorn.org","size":11805,"stargazers_count":1988,"watchers_count":1988,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":401,"mirror_url":null,"open_issues_count":47,"forks":401,"open_issues":47,"watchers":1988,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/benoitc/gunicorn/pulls/874"},"html":{"href":"https://github.com/benoitc/gunicorn/pull/874"},"issue":{"href":"https://api.github.com/repos/benoitc/gunicorn/issues/874"},"comments":{"href":"https://api.github.com/repos/benoitc/gunicorn/issues/874/comments"},"review_comments":{"href":"https://api.github.com/repos/benoitc/gunicorn/pulls/874/comments"},"review_comment":{"href":"https://api.github.com/repos/benoitc/gunicorn/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/benoitc/gunicorn/pulls/874/commits"},"statuses":{"href":"https://api.github.com/repos/benoitc/gunicorn/statuses/2e5150e07b337734652e2dbc77179b8a7bf9d871"}}}}