GitHub PullRequestEvent at 2014-06-12 22:00:28
Repository: socket.io-client
Actor: guille
Payload: {"action":"closed","number":655,"pull_request":{"url":"https://api.github.com/repos/Automattic/socket.io-client/pulls/655","id":14422985,"html_url":"https://github.com/Automattic/socket.io-client/pull/655","diff_url":"https://github.com/Automattic/socket.io-client/pull/655.diff","patch_url":"https://github.com/Automattic/socket.io-client/pull/655.patch","issue_url":"https://api.github.com/repos/Automattic/socket.io-client/issues/655","number":655,"state":"closed","title":"Fix incorrect ports in connection URL","user":{"login":"holic","id":508855,"avatar_url":"https://avatars.githubusercontent.com/u/508855?","gravatar_id":"f0ecb1a273c213a8b3f4bcd313f3f584","url":"https://api.github.com/users/holic","html_url":"https://github.com/holic","followers_url":"https://api.github.com/users/holic/followers","following_url":"https://api.github.com/users/holic/following{/other_user}","gists_url":"https://api.github.com/users/holic/gists{/gist_id}","starred_url":"https://api.github.com/users/holic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holic/subscriptions","organizations_url":"https://api.github.com/users/holic/orgs","repos_url":"https://api.github.com/users/holic/repos","events_url":"https://api.github.com/users/holic/events{/privacy}","received_events_url":"https://api.github.com/users/holic/received_events","type":"User","site_admin":false},"body":"When connecting to a Socket.IO server running on a standard HTTP/HTTPS port (80/443) with the client script running on a non-standard port, the server port is replaced with the (incorrect) client port.\r\n\r\nThis happens due to Socket.IO's URL normalization for multiplexing support. The port is removed from the URL where the server is using a port standard to the protocol (80 for HTTP, 443 for HTTPS). Once missing, Engine.IO assumes the port should match the client location's port, which would be incorrect in the scenario above.\r\n\r\nI noticed this bug while developing on my local :8080 web server while trying to connect to a Socket.IO server running on :443 using a HTTPS URL with and without a port defined.\r\n\r\n----\r\n\r\nLatest `socket.io-client` running on `localhost:8080` establishes a connection via:\r\n\r\n```js\r\nvar socket = io('https://some-domain.com');\r\n```\r\n\r\nInstead of connecting to `https://some-domain.com/socket.io/?EIO=2&transport=polling`, Socket.IO tries to connect to `https://some-domain.com:8080/socket.io/?EIO=2&transport=polling` (notice the port).\r\n\r\n---\r\n\r\nIn the meantime, I have replaced Socket.IO with [Primus](/primus/primus) with Engine.IO and `primus-emitter` to simulate Socket.IO's functionality.","created_at":"2014-04-06T09:42:20Z","updated_at":"2014-06-12T22:00:27Z","closed_at":"2014-06-12T22:00:27Z","merged_at":"2014-06-12T22:00:27Z","merge_commit_sha":"05ac7e5394ec1df26bf92b24a4319c8a976830ca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/socket.io-client/pulls/655/commits","review_comments_url":"https://api.github.com/repos/Automattic/socket.io-client/pulls/655/comments","review_comment_url":"https://api.github.com/repos/Automattic/socket.io-client/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Automattic/socket.io-client/issues/655/comments","statuses_url":"https://api.github.com/repos/Automattic/socket.io-client/statuses/d08acd89c7a99a5e2fa18e011de1fe7f191bf438","head":{"label":"holic:fix-url-port","ref":"fix-url-port","sha":"d08acd89c7a99a5e2fa18e011de1fe7f191bf438","user":{"login":"holic","id":508855,"avatar_url":"https://avatars.githubusercontent.com/u/508855?","gravatar_id":"f0ecb1a273c213a8b3f4bcd313f3f584","url":"https://api.github.com/users/holic","html_url":"https://github.com/holic","followers_url":"https://api.github.com/users/holic/followers","following_url":"https://api.github.com/users/holic/following{/other_user}","gists_url":"https://api.github.com/users/holic/gists{/gist_id}","starred_url":"https://api.github.com/users/holic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holic/subscriptions","organizations_url":"https://api.github.com/users/holic/orgs","repos_url":"https://api.github.com/users/holic/repos","events_url":"https://api.github.com/users/holic/events{/privacy}","received_events_url":"https://api.github.com/users/holic/received_events","type":"User","site_admin":false},"repo":{"id":18486231,"name":"socket.io-client","full_name":"holic/socket.io-client","owner":{"login":"holic","id":508855,"avatar_url":"https://avatars.githubusercontent.com/u/508855?","gravatar_id":"f0ecb1a273c213a8b3f4bcd313f3f584","url":"https://api.github.com/users/holic","html_url":"https://github.com/holic","followers_url":"https://api.github.com/users/holic/followers","following_url":"https://api.github.com/users/holic/following{/other_user}","gists_url":"https://api.github.com/users/holic/gists{/gist_id}","starred_url":"https://api.github.com/users/holic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holic/subscriptions","organizations_url":"https://api.github.com/users/holic/orgs","repos_url":"https://api.github.com/users/holic/repos","events_url":"https://api.github.com/users/holic/events{/privacy}","received_events_url":"https://api.github.com/users/holic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/holic/socket.io-client","description":"Sockets for the rest of us","fork":true,"url":"https://api.github.com/repos/holic/socket.io-client","forks_url":"https://api.github.com/repos/holic/socket.io-client/forks","keys_url":"https://api.github.com/repos/holic/socket.io-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/holic/socket.io-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/holic/socket.io-client/teams","hooks_url":"https://api.github.com/repos/holic/socket.io-client/hooks","issue_events_url":"https://api.github.com/repos/holic/socket.io-client/issues/events{/number}","events_url":"https://api.github.com/repos/holic/socket.io-client/events","assignees_url":"https://api.github.com/repos/holic/socket.io-client/assignees{/user}","branches_url":"https://api.github.com/repos/holic/socket.io-client/branches{/branch}","tags_url":"https://api.github.com/repos/holic/socket.io-client/tags","blobs_url":"https://api.github.com/repos/holic/socket.io-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/holic/socket.io-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/holic/socket.io-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/holic/socket.io-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/holic/socket.io-client/statuses/{sha}","languages_url":"https://api.github.com/repos/holic/socket.io-client/languages","stargazers_url":"https://api.github.com/repos/holic/socket.io-client/stargazers","contributors_url":"https://api.github.com/repos/holic/socket.io-client/contributors","subscribers_url":"https://api.github.com/repos/holic/socket.io-client/subscribers","subscription_url":"https://api.github.com/repos/holic/socket.io-client/subscription","commits_url":"https://api.github.com/repos/holic/socket.io-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/holic/socket.io-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/holic/socket.io-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/holic/socket.io-client/issues/comments/{number}","contents_url":"https://api.github.com/repos/holic/socket.io-client/contents/{+path}","compare_url":"https://api.github.com/repos/holic/socket.io-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/holic/socket.io-client/merges","archive_url":"https://api.github.com/repos/holic/socket.io-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/holic/socket.io-client/downloads","issues_url":"https://api.github.com/repos/holic/socket.io-client/issues{/number}","pulls_url":"https://api.github.com/repos/holic/socket.io-client/pulls{/number}","milestones_url":"https://api.github.com/repos/holic/socket.io-client/milestones{/number}","notifications_url":"https://api.github.com/repos/holic/socket.io-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/holic/socket.io-client/labels{/name}","releases_url":"https://api.github.com/repos/holic/socket.io-client/releases{/id}","created_at":"2014-04-06T09:19:44Z","updated_at":"2014-06-12T22:00:27Z","pushed_at":"2014-06-12T21:33:06Z","git_url":"git://github.com/holic/socket.io-client.git","ssh_url":"git@github.com:holic/socket.io-client.git","clone_url":"https://github.com/holic/socket.io-client.git","svn_url":"https://github.com/holic/socket.io-client","homepage":"http://socket.io","size":3582,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"1efe0d05c59bddefb2bd76fe711253aa7d08dd5b","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?","gravatar_id":"f0e0363f91f915ebc9cd3c6671bc5b5c","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":557977,"name":"socket.io-client","full_name":"Automattic/socket.io-client","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?","gravatar_id":"f0e0363f91f915ebc9cd3c6671bc5b5c","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/socket.io-client","description":"Realtime application framework (client)","fork":false,"url":"https://api.github.com/repos/Automattic/socket.io-client","forks_url":"https://api.github.com/repos/Automattic/socket.io-client/forks","keys_url":"https://api.github.com/repos/Automattic/socket.io-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/socket.io-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/socket.io-client/teams","hooks_url":"https://api.github.com/repos/Automattic/socket.io-client/hooks","issue_events_url":"https://api.github.com/repos/Automattic/socket.io-client/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/socket.io-client/events","assignees_url":"https://api.github.com/repos/Automattic/socket.io-client/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/socket.io-client/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/socket.io-client/tags","blobs_url":"https://api.github.com/repos/Automattic/socket.io-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/socket.io-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/socket.io-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/socket.io-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/socket.io-client/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/socket.io-client/languages","stargazers_url":"https://api.github.com/repos/Automattic/socket.io-client/stargazers","contributors_url":"https://api.github.com/repos/Automattic/socket.io-client/contributors","subscribers_url":"https://api.github.com/repos/Automattic/socket.io-client/subscribers","subscription_url":"https://api.github.com/repos/Automattic/socket.io-client/subscription","commits_url":"https://api.github.com/repos/Automattic/socket.io-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/socket.io-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/socket.io-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/socket.io-client/issues/comments/{number}","contents_url":"https://api.github.com/repos/Automattic/socket.io-client/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/socket.io-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/socket.io-client/merges","archive_url":"https://api.github.com/repos/Automattic/socket.io-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/socket.io-client/downloads","issues_url":"https://api.github.com/repos/Automattic/socket.io-client/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/socket.io-client/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/socket.io-client/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/socket.io-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/socket.io-client/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/socket.io-client/releases{/id}","created_at":"2010-03-11T18:23:03Z","updated_at":"2014-06-12T22:00:27Z","pushed_at":"2014-06-12T22:00:28Z","git_url":"git://github.com/Automattic/socket.io-client.git","ssh_url":"git@github.com:Automattic/socket.io-client.git","clone_url":"https://github.com/Automattic/socket.io-client.git","svn_url":"https://github.com/Automattic/socket.io-client","homepage":"http://socket.io","size":7946,"stargazers_count":2316,"watchers_count":2316,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":725,"mirror_url":null,"open_issues_count":257,"forks":725,"open_issues":257,"watchers":2316,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/socket.io-client/pulls/655"},"html":{"href":"https://github.com/Automattic/socket.io-client/pull/655"},"issue":{"href":"https://api.github.com/repos/Automattic/socket.io-client/issues/655"},"comments":{"href":"https://api.github.com/repos/Automattic/socket.io-client/issues/655/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/socket.io-client/pulls/655/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/socket.io-client/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Automattic/socket.io-client/pulls/655/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/socket.io-client/statuses/d08acd89c7a99a5e2fa18e011de1fe7f191bf438"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"guille","id":13041,"avatar_url":"https://avatars.githubusercontent.com/u/13041?","gravatar_id":"486e20e16ef676a02ac0299d2f92b813","url":"https://api.github.com/users/guille","html_url":"https://github.com/guille","followers_url":"https://api.github.com/users/guille/followers","following_url":"https://api.github.com/users/guille/following{/other_user}","gists_url":"https://api.github.com/users/guille/gists{/gist_id}","starred_url":"https://api.github.com/users/guille/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guille/subscriptions","organizations_url":"https://api.github.com/users/guille/orgs","repos_url":"https://api.github.com/users/guille/repos","events_url":"https://api.github.com/users/guille/events{/privacy}","received_events_url":"https://api.github.com/users/guille/received_events","type":"User","site_admin":false},"comments":17,"review_comments":2,"commits":3,"additions":11,"deletions":7,"changed_files":2}}