{"action":"created","comment":{"url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/pulls/comments/178088436","pull_request_review_id":108088280,"id":178088436,"diff_hunk":"@@ -95,10 +99,33 @@ function sendResponse(socketId, buffer, keepAlive) {\n   });\n }\n \n+function createResponseHeader(httpStatus, keepAlive, file) {\n+  const contentType = file ? file.type : 'text/plain';\n+  const contentLength = file ? file.size : 0;\n+  const lines = [\n+    `HTTP/1.0 ${httpStatus}`,\n+    `Content-Length: ${contentLength}`,\n+    `Content-Type: ${contentType}`\n+  ];\n+\n+  if (keepAlive) {\n+    lines.push('Connection: keep-alive');\n+  }\n+\n+  const responseText = lines.join('\\n') + '\\n\\n'; // eslint-disable-line","path":"src/storage/file-server.js","position":108,"original_position":108,"commit_id":"d2efb7cf0666604cdf21ad29becfbb278c16d236","original_commit_id":"d2efb7cf0666604cdf21ad29becfbb278c16d236","user":{"login":"tejohnso","id":1511535,"avatar_url":"https://avatars3.githubusercontent.com/u/1511535?v=4","gravatar_id":"","url":"https://api.github.com/users/tejohnso","html_url":"https://github.com/tejohnso","followers_url":"https://api.github.com/users/tejohnso/followers","following_url":"https://api.github.com/users/tejohnso/following{/other_user}","gists_url":"https://api.github.com/users/tejohnso/gists{/gist_id}","starred_url":"https://api.github.com/users/tejohnso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tejohnso/subscriptions","organizations_url":"https://api.github.com/users/tejohnso/orgs","repos_url":"https://api.github.com/users/tejohnso/repos","events_url":"https://api.github.com/users/tejohnso/events{/privacy}","received_events_url":"https://api.github.com/users/tejohnso/received_events","type":"User","site_admin":false},"body":"If I recall correctly, the spec is '\\r\\n' - did you try that?","created_at":"2018-03-29T15:11:40Z","updated_at":"2018-03-29T15:12:46Z","html_url":"https://github.com/Rise-Vision/chrome-os-player/pull/40#discussion_r178088436","pull_request_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/pulls/40","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Rise-Vision/chrome-os-player/pulls/comments/178088436"},"html":{"href":"https://github.com/Rise-Vision/chrome-os-player/pull/40#discussion_r178088436"},"pull_request":{"href":"https://api.github.com/repos/Rise-Vision/chrome-os-player/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/pulls/40","id":178328910,"html_url":"https://github.com/Rise-Vision/chrome-os-player/pull/40","diff_url":"https://github.com/Rise-Vision/chrome-os-player/pull/40.diff","patch_url":"https://github.com/Rise-Vision/chrome-os-player/pull/40.patch","issue_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/issues/40","number":40,"state":"open","locked":false,"title":"Serving files","user":{"login":"andrecardoso","id":161674,"avatar_url":"https://avatars3.githubusercontent.com/u/161674?v=4","gravatar_id":"","url":"https://api.github.com/users/andrecardoso","html_url":"https://github.com/andrecardoso","followers_url":"https://api.github.com/users/andrecardoso/followers","following_url":"https://api.github.com/users/andrecardoso/following{/other_user}","gists_url":"https://api.github.com/users/andrecardoso/gists{/gist_id}","starred_url":"https://api.github.com/users/andrecardoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrecardoso/subscriptions","organizations_url":"https://api.github.com/users/andrecardoso/orgs","repos_url":"https://api.github.com/users/andrecardoso/repos","events_url":"https://api.github.com/users/andrecardoso/events{/privacy}","received_events_url":"https://api.github.com/users/andrecardoso/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-29T13:29:23Z","updated_at":"2018-03-29T15:12:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6996ab6419a1328c1ee4d6d6b72358277820176","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/pulls/40/commits","review_comments_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/pulls/40/comments","review_comment_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/issues/40/comments","statuses_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/statuses/d2efb7cf0666604cdf21ad29becfbb278c16d236","head":{"label":"Rise-Vision:feature/serving-files","ref":"feature/serving-files","sha":"d2efb7cf0666604cdf21ad29becfbb278c16d236","user":{"login":"Rise-Vision","id":6840223,"avatar_url":"https://avatars2.githubusercontent.com/u/6840223?v=4","gravatar_id":"","url":"https://api.github.com/users/Rise-Vision","html_url":"https://github.com/Rise-Vision","followers_url":"https://api.github.com/users/Rise-Vision/followers","following_url":"https://api.github.com/users/Rise-Vision/following{/other_user}","gists_url":"https://api.github.com/users/Rise-Vision/gists{/gist_id}","starred_url":"https://api.github.com/users/Rise-Vision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rise-Vision/subscriptions","organizations_url":"https://api.github.com/users/Rise-Vision/orgs","repos_url":"https://api.github.com/users/Rise-Vision/repos","events_url":"https://api.github.com/users/Rise-Vision/events{/privacy}","received_events_url":"https://api.github.com/users/Rise-Vision/received_events","type":"Organization","site_admin":false},"repo":{"id":122349069,"name":"chrome-os-player","full_name":"Rise-Vision/chrome-os-player","owner":{"login":"Rise-Vision","id":6840223,"avatar_url":"https://avatars2.githubusercontent.com/u/6840223?v=4","gravatar_id":"","url":"https://api.github.com/users/Rise-Vision","html_url":"https://github.com/Rise-Vision","followers_url":"https://api.github.com/users/Rise-Vision/followers","following_url":"https://api.github.com/users/Rise-Vision/following{/other_user}","gists_url":"https://api.github.com/users/Rise-Vision/gists{/gist_id}","starred_url":"https://api.github.com/users/Rise-Vision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rise-Vision/subscriptions","organizations_url":"https://api.github.com/users/Rise-Vision/orgs","repos_url":"https://api.github.com/users/Rise-Vision/repos","events_url":"https://api.github.com/users/Rise-Vision/events{/privacy}","received_events_url":"https://api.github.com/users/Rise-Vision/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Rise-Vision/chrome-os-player","description":null,"fork":false,"url":"https://api.github.com/repos/Rise-Vision/chrome-os-player","forks_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/forks","keys_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/teams","hooks_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/hooks","issue_events_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/issues/events{/number}","events_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/events","assignees_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/assignees{/user}","branches_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/branches{/branch}","tags_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/tags","blobs_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/statuses/{sha}","languages_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/languages","stargazers_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/stargazers","contributors_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/contributors","subscribers_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/subscribers","subscription_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/subscription","commits_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/contents/{+path}","compare_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/merges","archive_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/downloads","issues_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/issues{/number}","pulls_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/pulls{/number}","milestones_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/milestones{/number}","notifications_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/labels{/name}","releases_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/releases{/id}","deployments_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/deployments","created_at":"2018-02-21T14:48:11Z","updated_at":"2018-03-27T20:18:47Z","pushed_at":"2018-03-29T13:29:24Z","git_url":"git://github.com/Rise-Vision/chrome-os-player.git","ssh_url":"git@github.com:Rise-Vision/chrome-os-player.git","clone_url":"https://github.com/Rise-Vision/chrome-os-player.git","svn_url":"https://github.com/Rise-Vision/chrome-os-player","homepage":null,"size":665,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"Rise-Vision:master","ref":"master","sha":"910a48e2644f9e2a28a4be39476ecdbde63c2f12","user":{"login":"Rise-Vision","id":6840223,"avatar_url":"https://avatars2.githubusercontent.com/u/6840223?v=4","gravatar_id":"","url":"https://api.github.com/users/Rise-Vision","html_url":"https://github.com/Rise-Vision","followers_url":"https://api.github.com/users/Rise-Vision/followers","following_url":"https://api.github.com/users/Rise-Vision/following{/other_user}","gists_url":"https://api.github.com/users/Rise-Vision/gists{/gist_id}","starred_url":"https://api.github.com/users/Rise-Vision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rise-Vision/subscriptions","organizations_url":"https://api.github.com/users/Rise-Vision/orgs","repos_url":"https://api.github.com/users/Rise-Vision/repos","events_url":"https://api.github.com/users/Rise-Vision/events{/privacy}","received_events_url":"https://api.github.com/users/Rise-Vision/received_events","type":"Organization","site_admin":false},"repo":{"id":122349069,"name":"chrome-os-player","full_name":"Rise-Vision/chrome-os-player","owner":{"login":"Rise-Vision","id":6840223,"avatar_url":"https://avatars2.githubusercontent.com/u/6840223?v=4","gravatar_id":"","url":"https://api.github.com/users/Rise-Vision","html_url":"https://github.com/Rise-Vision","followers_url":"https://api.github.com/users/Rise-Vision/followers","following_url":"https://api.github.com/users/Rise-Vision/following{/other_user}","gists_url":"https://api.github.com/users/Rise-Vision/gists{/gist_id}","starred_url":"https://api.github.com/users/Rise-Vision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rise-Vision/subscriptions","organizations_url":"https://api.github.com/users/Rise-Vision/orgs","repos_url":"https://api.github.com/users/Rise-Vision/repos","events_url":"https://api.github.com/users/Rise-Vision/events{/privacy}","received_events_url":"https://api.github.com/users/Rise-Vision/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Rise-Vision/chrome-os-player","description":null,"fork":false,"url":"https://api.github.com/repos/Rise-Vision/chrome-os-player","forks_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/forks","keys_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/teams","hooks_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/hooks","issue_events_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/issues/events{/number}","events_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/events","assignees_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/assignees{/user}","branches_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/branches{/branch}","tags_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/tags","blobs_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/statuses/{sha}","languages_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/languages","stargazers_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/stargazers","contributors_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/contributors","subscribers_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/subscribers","subscription_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/subscription","commits_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/contents/{+path}","compare_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/merges","archive_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/downloads","issues_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/issues{/number}","pulls_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/pulls{/number}","milestones_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/milestones{/number}","notifications_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/labels{/name}","releases_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/releases{/id}","deployments_url":"https://api.github.com/repos/Rise-Vision/chrome-os-player/deployments","created_at":"2018-02-21T14:48:11Z","updated_at":"2018-03-27T20:18:47Z","pushed_at":"2018-03-29T13:29:24Z","git_url":"git://github.com/Rise-Vision/chrome-os-player.git","ssh_url":"git@github.com:Rise-Vision/chrome-os-player.git","clone_url":"https://github.com/Rise-Vision/chrome-os-player.git","svn_url":"https://github.com/Rise-Vision/chrome-os-player","homepage":null,"size":665,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Rise-Vision/chrome-os-player/pulls/40"},"html":{"href":"https://github.com/Rise-Vision/chrome-os-player/pull/40"},"issue":{"href":"https://api.github.com/repos/Rise-Vision/chrome-os-player/issues/40"},"comments":{"href":"https://api.github.com/repos/Rise-Vision/chrome-os-player/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/Rise-Vision/chrome-os-player/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/Rise-Vision/chrome-os-player/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Rise-Vision/chrome-os-player/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/Rise-Vision/chrome-os-player/statuses/d2efb7cf0666604cdf21ad29becfbb278c16d236"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tejohnso"}}