{"action":"created","comment":{"url":"https://api.github.com/repos/tailhook/rotor-http/pulls/comments/55141974","id":55141974,"diff_hunk":"@@ -931,4 +816,185 @@ mod test {\n         });\n     }\n \n+    #[test]\n+    fn test_newline_delimited() {\n+        let mut io = MemIo::new();\n+        let mut lp = MockLoop::new(Default::default());\n+        io.push_bytes(\"GET / HTTP/1.1\\n\\\n+            Content-Length: 0\\n\\\n+            Connection: close\\n\\n\"\n+                          .as_bytes());\n+        let m = Stream::<Parser<Proto, MemIo>>::accepted(io.clone(), &mut lp.scope(1))\n+                    .expect_machine();\n+        m.ready(EventSet::readable(), &mut lp.scope(1))\n+         .expect_machine();\n+        assert_eq!(*lp.ctx(),\n+                   Context {\n+                       progressive: false,\n+                       headers_received: 1,\n+                       body: String::from(\"\"),\n+                       chunks_received: 0,\n+                       requests_received: 1,\n+                   });\n+    }\n+\n+    // FIXME\n+    #[test]\n+    #[should_panic]","path":"src/server/parser.rs","position":null,"original_position":997,"commit_id":"3dbf19489343e23d36c13d9def80a59fd5157b69","original_commit_id":"2ee332de2ee3916791f72ba1a3b68680d085e9c1","user":{"login":"tailhook","id":321799,"avatar_url":"https://avatars.githubusercontent.com/u/321799?v=3","gravatar_id":"","url":"https://api.github.com/users/tailhook","html_url":"https://github.com/tailhook","followers_url":"https://api.github.com/users/tailhook/followers","following_url":"https://api.github.com/users/tailhook/following{/other_user}","gists_url":"https://api.github.com/users/tailhook/gists{/gist_id}","starred_url":"https://api.github.com/users/tailhook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tailhook/subscriptions","organizations_url":"https://api.github.com/users/tailhook/orgs","repos_url":"https://api.github.com/users/tailhook/repos","events_url":"https://api.github.com/users/tailhook/events{/privacy}","received_events_url":"https://api.github.com/users/tailhook/received_events","type":"User","site_admin":false},"body":"It parses just one because `Proto` doesn't write anything to the response. And parser needs `Response` to be fully done before it starts to parse next request.","created_at":"2016-03-06T15:14:30Z","updated_at":"2016-03-06T15:14:30Z","html_url":"https://github.com/tailhook/rotor-http/pull/28#discussion_r55141974","pull_request_url":"https://api.github.com/repos/tailhook/rotor-http/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/tailhook/rotor-http/pulls/comments/55141974"},"html":{"href":"https://github.com/tailhook/rotor-http/pull/28#discussion_r55141974"},"pull_request":{"href":"https://api.github.com/repos/tailhook/rotor-http/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/tailhook/rotor-http/pulls/28","id":61807667,"html_url":"https://github.com/tailhook/rotor-http/pull/28","diff_url":"https://github.com/tailhook/rotor-http/pull/28.diff","patch_url":"https://github.com/tailhook/rotor-http/pull/28.patch","issue_url":"https://api.github.com/repos/tailhook/rotor-http/issues/28","number":28,"state":"open","locked":false,"title":"Add support for \\n line endings in server.","user":{"login":"pyfisch","id":2781017,"avatar_url":"https://avatars.githubusercontent.com/u/2781017?v=3","gravatar_id":"","url":"https://api.github.com/users/pyfisch","html_url":"https://github.com/pyfisch","followers_url":"https://api.github.com/users/pyfisch/followers","following_url":"https://api.github.com/users/pyfisch/following{/other_user}","gists_url":"https://api.github.com/users/pyfisch/gists{/gist_id}","starred_url":"https://api.github.com/users/pyfisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyfisch/subscriptions","organizations_url":"https://api.github.com/users/pyfisch/orgs","repos_url":"https://api.github.com/users/pyfisch/repos","events_url":"https://api.github.com/users/pyfisch/events{/privacy}","received_events_url":"https://api.github.com/users/pyfisch/received_events","type":"User","site_admin":false},"body":"* Split `Context.emit_error_page()` into `bad_request`,\r\n  `payload_too_large` and `request_timeout` methods. This\r\n  allows simpler methods and backwards compatible addidition\r\n  of errors.\r\n* Add a `continue_response` method to `Response`. This change\r\n  assures that only one `100 Continue` response is sent and\r\n  makes it easier to write the parser code.\r\n* Split the error handling into individual functions. Usually\r\n  it is known if a `bad_request` response can be sent or if the\r\n  request has been started. If not this can be checked easily.\r\n* Add benchmarks for the server parser and more tests.","created_at":"2016-03-05T09:56:33Z","updated_at":"2016-03-06T15:14:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"33d5d6c628ffcc0df30afef2388553978cb66deb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tailhook/rotor-http/pulls/28/commits","review_comments_url":"https://api.github.com/repos/tailhook/rotor-http/pulls/28/comments","review_comment_url":"https://api.github.com/repos/tailhook/rotor-http/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tailhook/rotor-http/issues/28/comments","statuses_url":"https://api.github.com/repos/tailhook/rotor-http/statuses/3dbf19489343e23d36c13d9def80a59fd5157b69","head":{"label":"pyfisch:alllineendings","ref":"alllineendings","sha":"3dbf19489343e23d36c13d9def80a59fd5157b69","user":{"login":"pyfisch","id":2781017,"avatar_url":"https://avatars.githubusercontent.com/u/2781017?v=3","gravatar_id":"","url":"https://api.github.com/users/pyfisch","html_url":"https://github.com/pyfisch","followers_url":"https://api.github.com/users/pyfisch/followers","following_url":"https://api.github.com/users/pyfisch/following{/other_user}","gists_url":"https://api.github.com/users/pyfisch/gists{/gist_id}","starred_url":"https://api.github.com/users/pyfisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyfisch/subscriptions","organizations_url":"https://api.github.com/users/pyfisch/orgs","repos_url":"https://api.github.com/users/pyfisch/repos","events_url":"https://api.github.com/users/pyfisch/events{/privacy}","received_events_url":"https://api.github.com/users/pyfisch/received_events","type":"User","site_admin":false},"repo":{"id":44593724,"name":"rotor-http","full_name":"pyfisch/rotor-http","owner":{"login":"pyfisch","id":2781017,"avatar_url":"https://avatars.githubusercontent.com/u/2781017?v=3","gravatar_id":"","url":"https://api.github.com/users/pyfisch","html_url":"https://github.com/pyfisch","followers_url":"https://api.github.com/users/pyfisch/followers","following_url":"https://api.github.com/users/pyfisch/following{/other_user}","gists_url":"https://api.github.com/users/pyfisch/gists{/gist_id}","starred_url":"https://api.github.com/users/pyfisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyfisch/subscriptions","organizations_url":"https://api.github.com/users/pyfisch/orgs","repos_url":"https://api.github.com/users/pyfisch/repos","events_url":"https://api.github.com/users/pyfisch/events{/privacy}","received_events_url":"https://api.github.com/users/pyfisch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pyfisch/rotor-http","description":"The mio/rotor based http server library for rust","fork":true,"url":"https://api.github.com/repos/pyfisch/rotor-http","forks_url":"https://api.github.com/repos/pyfisch/rotor-http/forks","keys_url":"https://api.github.com/repos/pyfisch/rotor-http/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pyfisch/rotor-http/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pyfisch/rotor-http/teams","hooks_url":"https://api.github.com/repos/pyfisch/rotor-http/hooks","issue_events_url":"https://api.github.com/repos/pyfisch/rotor-http/issues/events{/number}","events_url":"https://api.github.com/repos/pyfisch/rotor-http/events","assignees_url":"https://api.github.com/repos/pyfisch/rotor-http/assignees{/user}","branches_url":"https://api.github.com/repos/pyfisch/rotor-http/branches{/branch}","tags_url":"https://api.github.com/repos/pyfisch/rotor-http/tags","blobs_url":"https://api.github.com/repos/pyfisch/rotor-http/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pyfisch/rotor-http/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pyfisch/rotor-http/git/refs{/sha}","trees_url":"https://api.github.com/repos/pyfisch/rotor-http/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pyfisch/rotor-http/statuses/{sha}","languages_url":"https://api.github.com/repos/pyfisch/rotor-http/languages","stargazers_url":"https://api.github.com/repos/pyfisch/rotor-http/stargazers","contributors_url":"https://api.github.com/repos/pyfisch/rotor-http/contributors","subscribers_url":"https://api.github.com/repos/pyfisch/rotor-http/subscribers","subscription_url":"https://api.github.com/repos/pyfisch/rotor-http/subscription","commits_url":"https://api.github.com/repos/pyfisch/rotor-http/commits{/sha}","git_commits_url":"https://api.github.com/repos/pyfisch/rotor-http/git/commits{/sha}","comments_url":"https://api.github.com/repos/pyfisch/rotor-http/comments{/number}","issue_comment_url":"https://api.github.com/repos/pyfisch/rotor-http/issues/comments{/number}","contents_url":"https://api.github.com/repos/pyfisch/rotor-http/contents/{+path}","compare_url":"https://api.github.com/repos/pyfisch/rotor-http/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pyfisch/rotor-http/merges","archive_url":"https://api.github.com/repos/pyfisch/rotor-http/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pyfisch/rotor-http/downloads","issues_url":"https://api.github.com/repos/pyfisch/rotor-http/issues{/number}","pulls_url":"https://api.github.com/repos/pyfisch/rotor-http/pulls{/number}","milestones_url":"https://api.github.com/repos/pyfisch/rotor-http/milestones{/number}","notifications_url":"https://api.github.com/repos/pyfisch/rotor-http/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pyfisch/rotor-http/labels{/name}","releases_url":"https://api.github.com/repos/pyfisch/rotor-http/releases{/id}","deployments_url":"https://api.github.com/repos/pyfisch/rotor-http/deployments","created_at":"2015-10-20T08:49:35Z","updated_at":"2016-01-26T19:52:16Z","pushed_at":"2016-03-06T15:12:51Z","git_url":"git://github.com/pyfisch/rotor-http.git","ssh_url":"git@github.com:pyfisch/rotor-http.git","clone_url":"https://github.com/pyfisch/rotor-http.git","svn_url":"https://github.com/pyfisch/rotor-http","homepage":null,"size":211,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":"tailhook:master","ref":"master","sha":"ef1fc37b0c9711b94549d5ecf24c99507f418c36","user":{"login":"tailhook","id":321799,"avatar_url":"https://avatars.githubusercontent.com/u/321799?v=3","gravatar_id":"","url":"https://api.github.com/users/tailhook","html_url":"https://github.com/tailhook","followers_url":"https://api.github.com/users/tailhook/followers","following_url":"https://api.github.com/users/tailhook/following{/other_user}","gists_url":"https://api.github.com/users/tailhook/gists{/gist_id}","starred_url":"https://api.github.com/users/tailhook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tailhook/subscriptions","organizations_url":"https://api.github.com/users/tailhook/orgs","repos_url":"https://api.github.com/users/tailhook/repos","events_url":"https://api.github.com/users/tailhook/events{/privacy}","received_events_url":"https://api.github.com/users/tailhook/received_events","type":"User","site_admin":false},"repo":{"id":40630289,"name":"rotor-http","full_name":"tailhook/rotor-http","owner":{"login":"tailhook","id":321799,"avatar_url":"https://avatars.githubusercontent.com/u/321799?v=3","gravatar_id":"","url":"https://api.github.com/users/tailhook","html_url":"https://github.com/tailhook","followers_url":"https://api.github.com/users/tailhook/followers","following_url":"https://api.github.com/users/tailhook/following{/other_user}","gists_url":"https://api.github.com/users/tailhook/gists{/gist_id}","starred_url":"https://api.github.com/users/tailhook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tailhook/subscriptions","organizations_url":"https://api.github.com/users/tailhook/orgs","repos_url":"https://api.github.com/users/tailhook/repos","events_url":"https://api.github.com/users/tailhook/events{/privacy}","received_events_url":"https://api.github.com/users/tailhook/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tailhook/rotor-http","description":"The mio/rotor based http server library for rust","fork":false,"url":"https://api.github.com/repos/tailhook/rotor-http","forks_url":"https://api.github.com/repos/tailhook/rotor-http/forks","keys_url":"https://api.github.com/repos/tailhook/rotor-http/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tailhook/rotor-http/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tailhook/rotor-http/teams","hooks_url":"https://api.github.com/repos/tailhook/rotor-http/hooks","issue_events_url":"https://api.github.com/repos/tailhook/rotor-http/issues/events{/number}","events_url":"https://api.github.com/repos/tailhook/rotor-http/events","assignees_url":"https://api.github.com/repos/tailhook/rotor-http/assignees{/user}","branches_url":"https://api.github.com/repos/tailhook/rotor-http/branches{/branch}","tags_url":"https://api.github.com/repos/tailhook/rotor-http/tags","blobs_url":"https://api.github.com/repos/tailhook/rotor-http/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tailhook/rotor-http/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tailhook/rotor-http/git/refs{/sha}","trees_url":"https://api.github.com/repos/tailhook/rotor-http/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tailhook/rotor-http/statuses/{sha}","languages_url":"https://api.github.com/repos/tailhook/rotor-http/languages","stargazers_url":"https://api.github.com/repos/tailhook/rotor-http/stargazers","contributors_url":"https://api.github.com/repos/tailhook/rotor-http/contributors","subscribers_url":"https://api.github.com/repos/tailhook/rotor-http/subscribers","subscription_url":"https://api.github.com/repos/tailhook/rotor-http/subscription","commits_url":"https://api.github.com/repos/tailhook/rotor-http/commits{/sha}","git_commits_url":"https://api.github.com/repos/tailhook/rotor-http/git/commits{/sha}","comments_url":"https://api.github.com/repos/tailhook/rotor-http/comments{/number}","issue_comment_url":"https://api.github.com/repos/tailhook/rotor-http/issues/comments{/number}","contents_url":"https://api.github.com/repos/tailhook/rotor-http/contents/{+path}","compare_url":"https://api.github.com/repos/tailhook/rotor-http/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tailhook/rotor-http/merges","archive_url":"https://api.github.com/repos/tailhook/rotor-http/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tailhook/rotor-http/downloads","issues_url":"https://api.github.com/repos/tailhook/rotor-http/issues{/number}","pulls_url":"https://api.github.com/repos/tailhook/rotor-http/pulls{/number}","milestones_url":"https://api.github.com/repos/tailhook/rotor-http/milestones{/number}","notifications_url":"https://api.github.com/repos/tailhook/rotor-http/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tailhook/rotor-http/labels{/name}","releases_url":"https://api.github.com/repos/tailhook/rotor-http/releases{/id}","deployments_url":"https://api.github.com/repos/tailhook/rotor-http/deployments","created_at":"2015-08-13T00:08:08Z","updated_at":"2016-03-05T14:09:18Z","pushed_at":"2016-03-06T15:12:52Z","git_url":"git://github.com/tailhook/rotor-http.git","ssh_url":"git@github.com:tailhook/rotor-http.git","clone_url":"https://github.com/tailhook/rotor-http.git","svn_url":"https://github.com/tailhook/rotor-http","homepage":null,"size":3687,"stargazers_count":67,"watchers_count":67,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":4,"forks":7,"open_issues":4,"watchers":67,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tailhook/rotor-http/pulls/28"},"html":{"href":"https://github.com/tailhook/rotor-http/pull/28"},"issue":{"href":"https://api.github.com/repos/tailhook/rotor-http/issues/28"},"comments":{"href":"https://api.github.com/repos/tailhook/rotor-http/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/tailhook/rotor-http/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/tailhook/rotor-http/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tailhook/rotor-http/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/tailhook/rotor-http/statuses/3dbf19489343e23d36c13d9def80a59fd5157b69"}}}}