{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/pulls/comments/52261210","id":52261210,"diff_hunk":"@@ -255,8 +267,36 @@ public override ValueTask<int> ReadAsyncImplementation(ArraySegment<byte> buffer\n                         }\n                         else\n                         {\n-                            throw new NotImplementedException(\"INVALID REQUEST FORMAT\");\n+                            ThrowInvalidFormat();\n+                        }\n+                    }\n+                }\n+                while (_mode == Mode.Trailer)\n+                {\n+                    // Consume request terminator\n+                    var scan = input.ConsumingStart();\n+                    var consumed = scan;\n+                    var ch1 = scan.Take();\n+                    var ch2 = scan.Take();\n+                    if (ch1 == -1 || ch2 == -1)\n+                    {\n+                        input.ConsumingComplete(consumed, scan);\n+                        if (input.RemoteIntakeFin)\n+                        {\n+                            ThrowChunkedRequestIncomplete();\n                         }\n+\n+                        await input;\n+                    }\n+                    else if (ch1 == '\\r' && ch2 == '\\n')\n+                    {\n+                        input.ConsumingComplete(scan, scan);","path":"src/Microsoft.AspNetCore.Server.Kestrel/Http/MessageBody.cs","position":null,"original_position":91,"commit_id":"143c61deb9a66034877f5766f7e349ee09d290be","original_commit_id":"374665fe9508b87df46267aba7a492e620a1ff82","user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"body":"I think the latest commit fixes this - but I can't compile it due to \r\n\r\n`Unable to resolve Microsoft.DotNet.CoreHost (>= 0.0.1-beta-00001) for DNXCore,Version=v5.0`","created_at":"2016-02-09T02:35:39Z","updated_at":"2016-02-09T02:35:39Z","html_url":"https://github.com/aspnet/KestrelHttpServer/pull/619#discussion_r52261210","pull_request_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/pulls/619","_links":{"self":{"href":"https://api.github.com/repos/aspnet/KestrelHttpServer/pulls/comments/52261210"},"html":{"href":"https://github.com/aspnet/KestrelHttpServer/pull/619#discussion_r52261210"},"pull_request":{"href":"https://api.github.com/repos/aspnet/KestrelHttpServer/pulls/619"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/pulls/619","id":58585561,"html_url":"https://github.com/aspnet/KestrelHttpServer/pull/619","diff_url":"https://github.com/aspnet/KestrelHttpServer/pull/619.diff","patch_url":"https://github.com/aspnet/KestrelHttpServer/pull/619.patch","issue_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/619","number":619,"state":"open","locked":false,"title":"Consume chunked request fully","user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"body":"Chunked requests have an extra `\\r\\n` at end\r\n\r\n```\r\n5\\r\\n\r\nHello\\r\\n\r\n6\\r\\n\r\nWorld\\r\\n\r\n0\\r\\n\r\n... Trailer headers ...\r\n\\r\\n\r\n```\r\n\r\nResolves #617\r\n\r\n@Tratcher is this correct?\r\n\r\n/cc @cesarbs @halter73 \r\n\r\nPlease note changes in tests","created_at":"2016-02-08T09:28:37Z","updated_at":"2016-02-09T02:35:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4bd681e705b685c507fb5440d71586da5baf541e","assignee":{"login":"cesarbs","id":924164,"avatar_url":"https://avatars.githubusercontent.com/u/924164?v=3","gravatar_id":"","url":"https://api.github.com/users/cesarbs","html_url":"https://github.com/cesarbs","followers_url":"https://api.github.com/users/cesarbs/followers","following_url":"https://api.github.com/users/cesarbs/following{/other_user}","gists_url":"https://api.github.com/users/cesarbs/gists{/gist_id}","starred_url":"https://api.github.com/users/cesarbs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cesarbs/subscriptions","organizations_url":"https://api.github.com/users/cesarbs/orgs","repos_url":"https://api.github.com/users/cesarbs/repos","events_url":"https://api.github.com/users/cesarbs/events{/privacy}","received_events_url":"https://api.github.com/users/cesarbs/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/aspnet/KestrelHttpServer/milestones/15","html_url":"https://github.com/aspnet/KestrelHttpServer/milestones/1.0.0-rc2","labels_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/milestones/15/labels","id":1377644,"number":15,"title":"1.0.0-rc2","description":null,"creator":{"login":"muratg","id":1808428,"avatar_url":"https://avatars.githubusercontent.com/u/1808428?v=3","gravatar_id":"","url":"https://api.github.com/users/muratg","html_url":"https://github.com/muratg","followers_url":"https://api.github.com/users/muratg/followers","following_url":"https://api.github.com/users/muratg/following{/other_user}","gists_url":"https://api.github.com/users/muratg/gists{/gist_id}","starred_url":"https://api.github.com/users/muratg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muratg/subscriptions","organizations_url":"https://api.github.com/users/muratg/orgs","repos_url":"https://api.github.com/users/muratg/repos","events_url":"https://api.github.com/users/muratg/events{/privacy}","received_events_url":"https://api.github.com/users/muratg/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":61,"state":"open","created_at":"2015-10-26T16:57:23Z","updated_at":"2016-02-08T21:23:24Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/pulls/619/commits","review_comments_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/pulls/619/comments","review_comment_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/619/comments","statuses_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/statuses/143c61deb9a66034877f5766f7e349ee09d290be","head":{"label":"benaadams:chunked-request","ref":"chunked-request","sha":"143c61deb9a66034877f5766f7e349ee09d290be","user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"repo":{"id":38999457,"name":"KestrelHttpServer","full_name":"benaadams/KestrelHttpServer","owner":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars.githubusercontent.com/u/1142958?v=3","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benaadams/KestrelHttpServer","description":"A development web server for ASP.NET vNext based on libuv.","fork":true,"url":"https://api.github.com/repos/benaadams/KestrelHttpServer","forks_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/forks","keys_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/teams","hooks_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/hooks","issue_events_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/issues/events{/number}","events_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/events","assignees_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/assignees{/user}","branches_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/branches{/branch}","tags_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/tags","blobs_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/git/refs{/sha}","trees_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/statuses/{sha}","languages_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/languages","stargazers_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/stargazers","contributors_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/contributors","subscribers_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/subscribers","subscription_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/subscription","commits_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/commits{/sha}","git_commits_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/git/commits{/sha}","comments_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/comments{/number}","issue_comment_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/issues/comments{/number}","contents_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/contents/{+path}","compare_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/merges","archive_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/downloads","issues_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/issues{/number}","pulls_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/pulls{/number}","milestones_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/milestones{/number}","notifications_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/labels{/name}","releases_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/releases{/id}","deployments_url":"https://api.github.com/repos/benaadams/KestrelHttpServer/deployments","created_at":"2015-07-13T08:10:06Z","updated_at":"2015-07-13T08:10:08Z","pushed_at":"2016-02-09T02:34:52Z","git_url":"git://github.com/benaadams/KestrelHttpServer.git","ssh_url":"git@github.com:benaadams/KestrelHttpServer.git","clone_url":"https://github.com/benaadams/KestrelHttpServer.git","svn_url":"https://github.com/benaadams/KestrelHttpServer","homepage":"","size":2412,"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":"ssl-websockets"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"fa181819c1c97620d930b3006d529a2b83675815","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":20344662,"name":"KestrelHttpServer","full_name":"aspnet/KestrelHttpServer","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/KestrelHttpServer","description":"A web server for ASP.NET 5 based on libuv.","fork":false,"url":"https://api.github.com/repos/aspnet/KestrelHttpServer","forks_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/forks","keys_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/teams","hooks_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/hooks","issue_events_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/events","assignees_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/tags","blobs_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/languages","stargazers_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/stargazers","contributors_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/contributors","subscribers_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/subscribers","subscription_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/subscription","commits_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/merges","archive_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/downloads","issues_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/KestrelHttpServer/deployments","created_at":"2014-05-30T22:46:28Z","updated_at":"2016-02-08T11:10:19Z","pushed_at":"2016-02-09T02:34:52Z","git_url":"git://github.com/aspnet/KestrelHttpServer.git","ssh_url":"git@github.com:aspnet/KestrelHttpServer.git","clone_url":"https://github.com/aspnet/KestrelHttpServer.git","svn_url":"https://github.com/aspnet/KestrelHttpServer","homepage":"","size":4395,"stargazers_count":690,"watchers_count":690,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":143,"mirror_url":null,"open_issues_count":59,"forks":143,"open_issues":59,"watchers":690,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/KestrelHttpServer/pulls/619"},"html":{"href":"https://github.com/aspnet/KestrelHttpServer/pull/619"},"issue":{"href":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/619"},"comments":{"href":"https://api.github.com/repos/aspnet/KestrelHttpServer/issues/619/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/KestrelHttpServer/pulls/619/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/KestrelHttpServer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/KestrelHttpServer/pulls/619/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/KestrelHttpServer/statuses/143c61deb9a66034877f5766f7e349ee09d290be"}}}}