{"action":"created","comment":{"url":"https://api.github.com/repos/hugmanrique/turbo-ws/pulls/comments/175205319","pull_request_review_id":104706966,"id":175205319,"diff_hunk":"@@ -33,14 +33,12 @@ export default class Server extends EventEmitter {\n   }\n \n   handleRequest(req, res) {\n-    const { path } = this;\n     setState(res, states.CONNECTING);\n-\n-    if (!isValidPath(path, req)) {\n-      return this.closeConnection(res, 400);\n+    const headers = req.getAllHeaders();\n+    if (/websocket/i.test(headers.get('Upgrade')) && /upgrade/i.test(headers.get('Connection'))) {\n+      return this.handleUpgrade(req, res);","path":"src/index.js","position":28,"original_position":28,"commit_id":"051f09098f95c5a3f5b13c0d92d1bc0abbe0d979","original_commit_id":"051f09098f95c5a3f5b13c0d92d1bc0abbe0d979","user":{"login":"lpinca","id":1443911,"avatar_url":"https://avatars0.githubusercontent.com/u/1443911?v=4","gravatar_id":"","url":"https://api.github.com/users/lpinca","html_url":"https://github.com/lpinca","followers_url":"https://api.github.com/users/lpinca/followers","following_url":"https://api.github.com/users/lpinca/following{/other_user}","gists_url":"https://api.github.com/users/lpinca/gists{/gist_id}","starred_url":"https://api.github.com/users/lpinca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpinca/subscriptions","organizations_url":"https://api.github.com/users/lpinca/orgs","repos_url":"https://api.github.com/users/lpinca/repos","events_url":"https://api.github.com/users/lpinca/events{/privacy}","received_events_url":"https://api.github.com/users/lpinca/received_events","type":"User","site_admin":false},"body":"@devsnek did you test this? From my understanding which may be wrong, this will handle stuff coming from `turbo-http` and in turn `turbo-net`. The `socket` provided by `turbo-net` is not compatible with the Node.js `net.Socket` so I _think_ you can't simply use an external server, unless that server is a `turbo-http` server. Is this the goal? It's not clear from the title.","created_at":"2018-03-16T20:25:20Z","updated_at":"2018-03-16T20:25:20Z","html_url":"https://github.com/hugmanrique/turbo-ws/pull/5#discussion_r175205319","pull_request_url":"https://api.github.com/repos/hugmanrique/turbo-ws/pulls/5","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/hugmanrique/turbo-ws/pulls/comments/175205319"},"html":{"href":"https://github.com/hugmanrique/turbo-ws/pull/5#discussion_r175205319"},"pull_request":{"href":"https://api.github.com/repos/hugmanrique/turbo-ws/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/hugmanrique/turbo-ws/pulls/5","id":175373821,"html_url":"https://github.com/hugmanrique/turbo-ws/pull/5","diff_url":"https://github.com/hugmanrique/turbo-ws/pull/5.diff","patch_url":"https://github.com/hugmanrique/turbo-ws/pull/5.patch","issue_url":"https://api.github.com/repos/hugmanrique/turbo-ws/issues/5","number":5,"state":"open","locked":false,"title":"allow extensible server","user":{"login":"devsnek","id":5952481,"avatar_url":"https://avatars3.githubusercontent.com/u/5952481?v=4","gravatar_id":"","url":"https://api.github.com/users/devsnek","html_url":"https://github.com/devsnek","followers_url":"https://api.github.com/users/devsnek/followers","following_url":"https://api.github.com/users/devsnek/following{/other_user}","gists_url":"https://api.github.com/users/devsnek/gists{/gist_id}","starred_url":"https://api.github.com/users/devsnek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devsnek/subscriptions","organizations_url":"https://api.github.com/users/devsnek/orgs","repos_url":"https://api.github.com/users/devsnek/repos","events_url":"https://api.github.com/users/devsnek/events{/privacy}","received_events_url":"https://api.github.com/users/devsnek/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-15T20:45:17Z","updated_at":"2018-03-16T20:25:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05d3f24374a30abe575c879a07543f128e5dadfe","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hugmanrique/turbo-ws/pulls/5/commits","review_comments_url":"https://api.github.com/repos/hugmanrique/turbo-ws/pulls/5/comments","review_comment_url":"https://api.github.com/repos/hugmanrique/turbo-ws/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hugmanrique/turbo-ws/issues/5/comments","statuses_url":"https://api.github.com/repos/hugmanrique/turbo-ws/statuses/051f09098f95c5a3f5b13c0d92d1bc0abbe0d979","head":{"label":"devsnek:allow-extensible-server","ref":"allow-extensible-server","sha":"051f09098f95c5a3f5b13c0d92d1bc0abbe0d979","user":{"login":"devsnek","id":5952481,"avatar_url":"https://avatars3.githubusercontent.com/u/5952481?v=4","gravatar_id":"","url":"https://api.github.com/users/devsnek","html_url":"https://github.com/devsnek","followers_url":"https://api.github.com/users/devsnek/followers","following_url":"https://api.github.com/users/devsnek/following{/other_user}","gists_url":"https://api.github.com/users/devsnek/gists{/gist_id}","starred_url":"https://api.github.com/users/devsnek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devsnek/subscriptions","organizations_url":"https://api.github.com/users/devsnek/orgs","repos_url":"https://api.github.com/users/devsnek/repos","events_url":"https://api.github.com/users/devsnek/events{/privacy}","received_events_url":"https://api.github.com/users/devsnek/received_events","type":"User","site_admin":false},"repo":{"id":125424115,"name":"turbo-ws","full_name":"devsnek/turbo-ws","owner":{"login":"devsnek","id":5952481,"avatar_url":"https://avatars3.githubusercontent.com/u/5952481?v=4","gravatar_id":"","url":"https://api.github.com/users/devsnek","html_url":"https://github.com/devsnek","followers_url":"https://api.github.com/users/devsnek/followers","following_url":"https://api.github.com/users/devsnek/following{/other_user}","gists_url":"https://api.github.com/users/devsnek/gists{/gist_id}","starred_url":"https://api.github.com/users/devsnek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devsnek/subscriptions","organizations_url":"https://api.github.com/users/devsnek/orgs","repos_url":"https://api.github.com/users/devsnek/repos","events_url":"https://api.github.com/users/devsnek/events{/privacy}","received_events_url":"https://api.github.com/users/devsnek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/devsnek/turbo-ws","description":":dash: Blazing fast low-level WebSocket server","fork":true,"url":"https://api.github.com/repos/devsnek/turbo-ws","forks_url":"https://api.github.com/repos/devsnek/turbo-ws/forks","keys_url":"https://api.github.com/repos/devsnek/turbo-ws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/devsnek/turbo-ws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/devsnek/turbo-ws/teams","hooks_url":"https://api.github.com/repos/devsnek/turbo-ws/hooks","issue_events_url":"https://api.github.com/repos/devsnek/turbo-ws/issues/events{/number}","events_url":"https://api.github.com/repos/devsnek/turbo-ws/events","assignees_url":"https://api.github.com/repos/devsnek/turbo-ws/assignees{/user}","branches_url":"https://api.github.com/repos/devsnek/turbo-ws/branches{/branch}","tags_url":"https://api.github.com/repos/devsnek/turbo-ws/tags","blobs_url":"https://api.github.com/repos/devsnek/turbo-ws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/devsnek/turbo-ws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/devsnek/turbo-ws/git/refs{/sha}","trees_url":"https://api.github.com/repos/devsnek/turbo-ws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/devsnek/turbo-ws/statuses/{sha}","languages_url":"https://api.github.com/repos/devsnek/turbo-ws/languages","stargazers_url":"https://api.github.com/repos/devsnek/turbo-ws/stargazers","contributors_url":"https://api.github.com/repos/devsnek/turbo-ws/contributors","subscribers_url":"https://api.github.com/repos/devsnek/turbo-ws/subscribers","subscription_url":"https://api.github.com/repos/devsnek/turbo-ws/subscription","commits_url":"https://api.github.com/repos/devsnek/turbo-ws/commits{/sha}","git_commits_url":"https://api.github.com/repos/devsnek/turbo-ws/git/commits{/sha}","comments_url":"https://api.github.com/repos/devsnek/turbo-ws/comments{/number}","issue_comment_url":"https://api.github.com/repos/devsnek/turbo-ws/issues/comments{/number}","contents_url":"https://api.github.com/repos/devsnek/turbo-ws/contents/{+path}","compare_url":"https://api.github.com/repos/devsnek/turbo-ws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/devsnek/turbo-ws/merges","archive_url":"https://api.github.com/repos/devsnek/turbo-ws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/devsnek/turbo-ws/downloads","issues_url":"https://api.github.com/repos/devsnek/turbo-ws/issues{/number}","pulls_url":"https://api.github.com/repos/devsnek/turbo-ws/pulls{/number}","milestones_url":"https://api.github.com/repos/devsnek/turbo-ws/milestones{/number}","notifications_url":"https://api.github.com/repos/devsnek/turbo-ws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/devsnek/turbo-ws/labels{/name}","releases_url":"https://api.github.com/repos/devsnek/turbo-ws/releases{/id}","deployments_url":"https://api.github.com/repos/devsnek/turbo-ws/deployments","created_at":"2018-03-15T20:44:38Z","updated_at":"2018-03-15T20:44:39Z","pushed_at":"2018-03-15T23:40:21Z","git_url":"git://github.com/devsnek/turbo-ws.git","ssh_url":"git@github.com:devsnek/turbo-ws.git","clone_url":"https://github.com/devsnek/turbo-ws.git","svn_url":"https://github.com/devsnek/turbo-ws","homepage":"","size":499,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hugmanrique:master","ref":"master","sha":"0c0d09d0a807300933fbb1fc5e6fb4c650db07d9","user":{"login":"hugmanrique","id":6255580,"avatar_url":"https://avatars0.githubusercontent.com/u/6255580?v=4","gravatar_id":"","url":"https://api.github.com/users/hugmanrique","html_url":"https://github.com/hugmanrique","followers_url":"https://api.github.com/users/hugmanrique/followers","following_url":"https://api.github.com/users/hugmanrique/following{/other_user}","gists_url":"https://api.github.com/users/hugmanrique/gists{/gist_id}","starred_url":"https://api.github.com/users/hugmanrique/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hugmanrique/subscriptions","organizations_url":"https://api.github.com/users/hugmanrique/orgs","repos_url":"https://api.github.com/users/hugmanrique/repos","events_url":"https://api.github.com/users/hugmanrique/events{/privacy}","received_events_url":"https://api.github.com/users/hugmanrique/received_events","type":"User","site_admin":false},"repo":{"id":124703848,"name":"turbo-ws","full_name":"hugmanrique/turbo-ws","owner":{"login":"hugmanrique","id":6255580,"avatar_url":"https://avatars0.githubusercontent.com/u/6255580?v=4","gravatar_id":"","url":"https://api.github.com/users/hugmanrique","html_url":"https://github.com/hugmanrique","followers_url":"https://api.github.com/users/hugmanrique/followers","following_url":"https://api.github.com/users/hugmanrique/following{/other_user}","gists_url":"https://api.github.com/users/hugmanrique/gists{/gist_id}","starred_url":"https://api.github.com/users/hugmanrique/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hugmanrique/subscriptions","organizations_url":"https://api.github.com/users/hugmanrique/orgs","repos_url":"https://api.github.com/users/hugmanrique/repos","events_url":"https://api.github.com/users/hugmanrique/events{/privacy}","received_events_url":"https://api.github.com/users/hugmanrique/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hugmanrique/turbo-ws","description":":dash: Blazing fast low-level WebSocket server","fork":false,"url":"https://api.github.com/repos/hugmanrique/turbo-ws","forks_url":"https://api.github.com/repos/hugmanrique/turbo-ws/forks","keys_url":"https://api.github.com/repos/hugmanrique/turbo-ws/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hugmanrique/turbo-ws/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hugmanrique/turbo-ws/teams","hooks_url":"https://api.github.com/repos/hugmanrique/turbo-ws/hooks","issue_events_url":"https://api.github.com/repos/hugmanrique/turbo-ws/issues/events{/number}","events_url":"https://api.github.com/repos/hugmanrique/turbo-ws/events","assignees_url":"https://api.github.com/repos/hugmanrique/turbo-ws/assignees{/user}","branches_url":"https://api.github.com/repos/hugmanrique/turbo-ws/branches{/branch}","tags_url":"https://api.github.com/repos/hugmanrique/turbo-ws/tags","blobs_url":"https://api.github.com/repos/hugmanrique/turbo-ws/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hugmanrique/turbo-ws/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hugmanrique/turbo-ws/git/refs{/sha}","trees_url":"https://api.github.com/repos/hugmanrique/turbo-ws/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hugmanrique/turbo-ws/statuses/{sha}","languages_url":"https://api.github.com/repos/hugmanrique/turbo-ws/languages","stargazers_url":"https://api.github.com/repos/hugmanrique/turbo-ws/stargazers","contributors_url":"https://api.github.com/repos/hugmanrique/turbo-ws/contributors","subscribers_url":"https://api.github.com/repos/hugmanrique/turbo-ws/subscribers","subscription_url":"https://api.github.com/repos/hugmanrique/turbo-ws/subscription","commits_url":"https://api.github.com/repos/hugmanrique/turbo-ws/commits{/sha}","git_commits_url":"https://api.github.com/repos/hugmanrique/turbo-ws/git/commits{/sha}","comments_url":"https://api.github.com/repos/hugmanrique/turbo-ws/comments{/number}","issue_comment_url":"https://api.github.com/repos/hugmanrique/turbo-ws/issues/comments{/number}","contents_url":"https://api.github.com/repos/hugmanrique/turbo-ws/contents/{+path}","compare_url":"https://api.github.com/repos/hugmanrique/turbo-ws/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hugmanrique/turbo-ws/merges","archive_url":"https://api.github.com/repos/hugmanrique/turbo-ws/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hugmanrique/turbo-ws/downloads","issues_url":"https://api.github.com/repos/hugmanrique/turbo-ws/issues{/number}","pulls_url":"https://api.github.com/repos/hugmanrique/turbo-ws/pulls{/number}","milestones_url":"https://api.github.com/repos/hugmanrique/turbo-ws/milestones{/number}","notifications_url":"https://api.github.com/repos/hugmanrique/turbo-ws/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hugmanrique/turbo-ws/labels{/name}","releases_url":"https://api.github.com/repos/hugmanrique/turbo-ws/releases{/id}","deployments_url":"https://api.github.com/repos/hugmanrique/turbo-ws/deployments","created_at":"2018-03-10T22:30:03Z","updated_at":"2018-03-16T19:31:08Z","pushed_at":"2018-03-15T23:40:22Z","git_url":"git://github.com/hugmanrique/turbo-ws.git","ssh_url":"git@github.com:hugmanrique/turbo-ws.git","clone_url":"https://github.com/hugmanrique/turbo-ws.git","svn_url":"https://github.com/hugmanrique/turbo-ws","homepage":"","size":496,"stargazers_count":574,"watchers_count":574,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":12,"open_issues":2,"watchers":574,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hugmanrique/turbo-ws/pulls/5"},"html":{"href":"https://github.com/hugmanrique/turbo-ws/pull/5"},"issue":{"href":"https://api.github.com/repos/hugmanrique/turbo-ws/issues/5"},"comments":{"href":"https://api.github.com/repos/hugmanrique/turbo-ws/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/hugmanrique/turbo-ws/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/hugmanrique/turbo-ws/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hugmanrique/turbo-ws/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/hugmanrique/turbo-ws/statuses/051f09098f95c5a3f5b13c0d92d1bc0abbe0d979"}},"author_association":"NONE"}}
{"actor":{"display_login":"lpinca"}}