{"action":"closed","number":5021,"pull_request":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/pulls/5021","id":65065023,"html_url":"https://github.com/HaxeFoundation/haxe/pull/5021","diff_url":"https://github.com/HaxeFoundation/haxe/pull/5021.diff","patch_url":"https://github.com/HaxeFoundation/haxe/pull/5021.patch","issue_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5021","number":5021,"state":"closed","locked":false,"title":"Improve handling of Transfer-encoding: chunked (closes #4950)","user":{"login":"pperidont","id":5232314,"avatar_url":"https://avatars.githubusercontent.com/u/5232314?v=3","gravatar_id":"","url":"https://api.github.com/users/pperidont","html_url":"https://github.com/pperidont","followers_url":"https://api.github.com/users/pperidont/followers","following_url":"https://api.github.com/users/pperidont/following{/other_user}","gists_url":"https://api.github.com/users/pperidont/gists{/gist_id}","starred_url":"https://api.github.com/users/pperidont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pperidont/subscriptions","organizations_url":"https://api.github.com/users/pperidont/orgs","repos_url":"https://api.github.com/users/pperidont/repos","events_url":"https://api.github.com/users/pperidont/events{/privacy}","received_events_url":"https://api.github.com/users/pperidont/received_events","type":"User","site_admin":false},"body":"I add `Connection: close` in request headers, as defined in RFC :\r\n> HTTP/1.1 applications that do not support persistent connections MUST include the \"close\" connection option in every message.\r\n\r\nFor body reading, I first check if the message is chunked, as we should ignore Content-Length in this case. RFC says :\r\n> If a message is received with both a Transfer-Encoding header field and a Content-Length header field, the latter MUST be ignored.\r\n\r\nI don't use `shutdown()` where transfer is chunked : we don't need an `Eof` in this case, a chunked message is ended by a 0-length chunk. In fact I think an Eof must be seen as an error here.\r\n\r\nI left the `shutdown()` when we need an `Eof`. That should only concern HTTP 1.0 servers, as HTTP 1.1 requires Content-Length or chunked transfer :\r\n> In order to remain persistent, all messages on the connection MUST have a self-defined message length (i.e., one not defined by closure of the connection)","created_at":"2016-04-03T10:42:56Z","updated_at":"2016-04-03T10:46:06Z","closed_at":"2016-04-03T10:46:06Z","merged_at":"2016-04-03T10:46:06Z","merge_commit_sha":"5d9eb04241c75c7f36c3c2e9eae123d65523ddef","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HaxeFoundation/haxe/pulls/5021/commits","review_comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/pulls/5021/comments","review_comment_url":"https://api.github.com/repos/HaxeFoundation/haxe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5021/comments","statuses_url":"https://api.github.com/repos/HaxeFoundation/haxe/statuses/2f148e9d8f67baf6804d534d095dad93383c7e10","head":{"label":"pperidont:http","ref":"http","sha":"2f148e9d8f67baf6804d534d095dad93383c7e10","user":{"login":"pperidont","id":5232314,"avatar_url":"https://avatars.githubusercontent.com/u/5232314?v=3","gravatar_id":"","url":"https://api.github.com/users/pperidont","html_url":"https://github.com/pperidont","followers_url":"https://api.github.com/users/pperidont/followers","following_url":"https://api.github.com/users/pperidont/following{/other_user}","gists_url":"https://api.github.com/users/pperidont/gists{/gist_id}","starred_url":"https://api.github.com/users/pperidont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pperidont/subscriptions","organizations_url":"https://api.github.com/users/pperidont/orgs","repos_url":"https://api.github.com/users/pperidont/repos","events_url":"https://api.github.com/users/pperidont/events{/privacy}","received_events_url":"https://api.github.com/users/pperidont/received_events","type":"User","site_admin":false},"repo":{"id":12763678,"name":"haxe","full_name":"pperidont/haxe","owner":{"login":"pperidont","id":5232314,"avatar_url":"https://avatars.githubusercontent.com/u/5232314?v=3","gravatar_id":"","url":"https://api.github.com/users/pperidont","html_url":"https://github.com/pperidont","followers_url":"https://api.github.com/users/pperidont/followers","following_url":"https://api.github.com/users/pperidont/following{/other_user}","gists_url":"https://api.github.com/users/pperidont/gists{/gist_id}","starred_url":"https://api.github.com/users/pperidont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pperidont/subscriptions","organizations_url":"https://api.github.com/users/pperidont/orgs","repos_url":"https://api.github.com/users/pperidont/repos","events_url":"https://api.github.com/users/pperidont/events{/privacy}","received_events_url":"https://api.github.com/users/pperidont/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pperidont/haxe","description":"Haxe - The Cross-Platform Toolkit","fork":true,"url":"https://api.github.com/repos/pperidont/haxe","forks_url":"https://api.github.com/repos/pperidont/haxe/forks","keys_url":"https://api.github.com/repos/pperidont/haxe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pperidont/haxe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pperidont/haxe/teams","hooks_url":"https://api.github.com/repos/pperidont/haxe/hooks","issue_events_url":"https://api.github.com/repos/pperidont/haxe/issues/events{/number}","events_url":"https://api.github.com/repos/pperidont/haxe/events","assignees_url":"https://api.github.com/repos/pperidont/haxe/assignees{/user}","branches_url":"https://api.github.com/repos/pperidont/haxe/branches{/branch}","tags_url":"https://api.github.com/repos/pperidont/haxe/tags","blobs_url":"https://api.github.com/repos/pperidont/haxe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pperidont/haxe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pperidont/haxe/git/refs{/sha}","trees_url":"https://api.github.com/repos/pperidont/haxe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pperidont/haxe/statuses/{sha}","languages_url":"https://api.github.com/repos/pperidont/haxe/languages","stargazers_url":"https://api.github.com/repos/pperidont/haxe/stargazers","contributors_url":"https://api.github.com/repos/pperidont/haxe/contributors","subscribers_url":"https://api.github.com/repos/pperidont/haxe/subscribers","subscription_url":"https://api.github.com/repos/pperidont/haxe/subscription","commits_url":"https://api.github.com/repos/pperidont/haxe/commits{/sha}","git_commits_url":"https://api.github.com/repos/pperidont/haxe/git/commits{/sha}","comments_url":"https://api.github.com/repos/pperidont/haxe/comments{/number}","issue_comment_url":"https://api.github.com/repos/pperidont/haxe/issues/comments{/number}","contents_url":"https://api.github.com/repos/pperidont/haxe/contents/{+path}","compare_url":"https://api.github.com/repos/pperidont/haxe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pperidont/haxe/merges","archive_url":"https://api.github.com/repos/pperidont/haxe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pperidont/haxe/downloads","issues_url":"https://api.github.com/repos/pperidont/haxe/issues{/number}","pulls_url":"https://api.github.com/repos/pperidont/haxe/pulls{/number}","milestones_url":"https://api.github.com/repos/pperidont/haxe/milestones{/number}","notifications_url":"https://api.github.com/repos/pperidont/haxe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pperidont/haxe/labels{/name}","releases_url":"https://api.github.com/repos/pperidont/haxe/releases{/id}","deployments_url":"https://api.github.com/repos/pperidont/haxe/deployments","created_at":"2013-09-11T18:11:23Z","updated_at":"2014-02-23T13:24:14Z","pushed_at":"2016-04-03T09:53:08Z","git_url":"git://github.com/pperidont/haxe.git","ssh_url":"git@github.com:pperidont/haxe.git","clone_url":"https://github.com/pperidont/haxe.git","svn_url":"https://github.com/pperidont/haxe","homepage":"http://haxe.org","size":49066,"stargazers_count":0,"watchers_count":0,"language":"Haxe","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":"development"}},"base":{"label":"HaxeFoundation:development","ref":"development","sha":"751adebe02adcde70d4083354a1469aeac83ce1e","user":{"login":"HaxeFoundation","id":3826779,"avatar_url":"https://avatars.githubusercontent.com/u/3826779?v=3","gravatar_id":"","url":"https://api.github.com/users/HaxeFoundation","html_url":"https://github.com/HaxeFoundation","followers_url":"https://api.github.com/users/HaxeFoundation/followers","following_url":"https://api.github.com/users/HaxeFoundation/following{/other_user}","gists_url":"https://api.github.com/users/HaxeFoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/HaxeFoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaxeFoundation/subscriptions","organizations_url":"https://api.github.com/users/HaxeFoundation/orgs","repos_url":"https://api.github.com/users/HaxeFoundation/repos","events_url":"https://api.github.com/users/HaxeFoundation/events{/privacy}","received_events_url":"https://api.github.com/users/HaxeFoundation/received_events","type":"Organization","site_admin":false},"repo":{"id":10282042,"name":"haxe","full_name":"HaxeFoundation/haxe","owner":{"login":"HaxeFoundation","id":3826779,"avatar_url":"https://avatars.githubusercontent.com/u/3826779?v=3","gravatar_id":"","url":"https://api.github.com/users/HaxeFoundation","html_url":"https://github.com/HaxeFoundation","followers_url":"https://api.github.com/users/HaxeFoundation/followers","following_url":"https://api.github.com/users/HaxeFoundation/following{/other_user}","gists_url":"https://api.github.com/users/HaxeFoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/HaxeFoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaxeFoundation/subscriptions","organizations_url":"https://api.github.com/users/HaxeFoundation/orgs","repos_url":"https://api.github.com/users/HaxeFoundation/repos","events_url":"https://api.github.com/users/HaxeFoundation/events{/privacy}","received_events_url":"https://api.github.com/users/HaxeFoundation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HaxeFoundation/haxe","description":"Haxe - The Cross-Platform Toolkit","fork":false,"url":"https://api.github.com/repos/HaxeFoundation/haxe","forks_url":"https://api.github.com/repos/HaxeFoundation/haxe/forks","keys_url":"https://api.github.com/repos/HaxeFoundation/haxe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HaxeFoundation/haxe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HaxeFoundation/haxe/teams","hooks_url":"https://api.github.com/repos/HaxeFoundation/haxe/hooks","issue_events_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/events{/number}","events_url":"https://api.github.com/repos/HaxeFoundation/haxe/events","assignees_url":"https://api.github.com/repos/HaxeFoundation/haxe/assignees{/user}","branches_url":"https://api.github.com/repos/HaxeFoundation/haxe/branches{/branch}","tags_url":"https://api.github.com/repos/HaxeFoundation/haxe/tags","blobs_url":"https://api.github.com/repos/HaxeFoundation/haxe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HaxeFoundation/haxe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HaxeFoundation/haxe/git/refs{/sha}","trees_url":"https://api.github.com/repos/HaxeFoundation/haxe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HaxeFoundation/haxe/statuses/{sha}","languages_url":"https://api.github.com/repos/HaxeFoundation/haxe/languages","stargazers_url":"https://api.github.com/repos/HaxeFoundation/haxe/stargazers","contributors_url":"https://api.github.com/repos/HaxeFoundation/haxe/contributors","subscribers_url":"https://api.github.com/repos/HaxeFoundation/haxe/subscribers","subscription_url":"https://api.github.com/repos/HaxeFoundation/haxe/subscription","commits_url":"https://api.github.com/repos/HaxeFoundation/haxe/commits{/sha}","git_commits_url":"https://api.github.com/repos/HaxeFoundation/haxe/git/commits{/sha}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/comments{/number}","issue_comment_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/comments{/number}","contents_url":"https://api.github.com/repos/HaxeFoundation/haxe/contents/{+path}","compare_url":"https://api.github.com/repos/HaxeFoundation/haxe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HaxeFoundation/haxe/merges","archive_url":"https://api.github.com/repos/HaxeFoundation/haxe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HaxeFoundation/haxe/downloads","issues_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues{/number}","pulls_url":"https://api.github.com/repos/HaxeFoundation/haxe/pulls{/number}","milestones_url":"https://api.github.com/repos/HaxeFoundation/haxe/milestones{/number}","notifications_url":"https://api.github.com/repos/HaxeFoundation/haxe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/labels{/name}","releases_url":"https://api.github.com/repos/HaxeFoundation/haxe/releases{/id}","deployments_url":"https://api.github.com/repos/HaxeFoundation/haxe/deployments","created_at":"2013-05-25T09:20:11Z","updated_at":"2016-04-03T04:52:44Z","pushed_at":"2016-04-03T10:46:06Z","git_url":"git://github.com/HaxeFoundation/haxe.git","ssh_url":"git@github.com:HaxeFoundation/haxe.git","clone_url":"https://github.com/HaxeFoundation/haxe.git","svn_url":"https://github.com/HaxeFoundation/haxe","homepage":"http://haxe.org","size":86743,"stargazers_count":1348,"watchers_count":1348,"language":"Haxe","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":280,"mirror_url":null,"open_issues_count":389,"forks":280,"open_issues":389,"watchers":1348,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/HaxeFoundation/haxe/pulls/5021"},"html":{"href":"https://github.com/HaxeFoundation/haxe/pull/5021"},"issue":{"href":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5021"},"comments":{"href":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5021/comments"},"review_comments":{"href":"https://api.github.com/repos/HaxeFoundation/haxe/pulls/5021/comments"},"review_comment":{"href":"https://api.github.com/repos/HaxeFoundation/haxe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HaxeFoundation/haxe/pulls/5021/commits"},"statuses":{"href":"https://api.github.com/repos/HaxeFoundation/haxe/statuses/2f148e9d8f67baf6804d534d095dad93383c7e10"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"ncannasse","id":1022912,"avatar_url":"https://avatars.githubusercontent.com/u/1022912?v=3","gravatar_id":"","url":"https://api.github.com/users/ncannasse","html_url":"https://github.com/ncannasse","followers_url":"https://api.github.com/users/ncannasse/followers","following_url":"https://api.github.com/users/ncannasse/following{/other_user}","gists_url":"https://api.github.com/users/ncannasse/gists{/gist_id}","starred_url":"https://api.github.com/users/ncannasse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncannasse/subscriptions","organizations_url":"https://api.github.com/users/ncannasse/orgs","repos_url":"https://api.github.com/users/ncannasse/repos","events_url":"https://api.github.com/users/ncannasse/events{/privacy}","received_events_url":"https://api.github.com/users/ncannasse/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":14,"deletions":11,"changed_files":1}}