{"action":"created","comment":{"url":"https://api.github.com/repos/mqttjs/MQTT.js/pulls/comments/30981056","id":30981056,"diff_hunk":"@@ -4,13 +4,16 @@ var websocket = require('websocket-stream'),\n   _URL = require('url');\n \n function buildBuilder (client, opts) {\n+  var wsOpt = {};\n+  wsOpt['protocol'] = 'mqttv3.1';\n+  if(opts.protocol == 'wss')\n+      if(opts.hasOwnProperty('rejectUnauthorized'))\n+          wsOpt['rejectUnauthorized'] = opts.rejectUnauthorized;","path":"lib/connect/ws.js","position":8,"original_position":8,"commit_id":"214a2847a0bdf7353bbe24a560c257ba0e9573c7","original_commit_id":"214a2847a0bdf7353bbe24a560c257ba0e9573c7","user":{"login":"mcollina","id":52195,"avatar_url":"https://avatars.githubusercontent.com/u/52195?v=3","gravatar_id":"","url":"https://api.github.com/users/mcollina","html_url":"https://github.com/mcollina","followers_url":"https://api.github.com/users/mcollina/followers","following_url":"https://api.github.com/users/mcollina/following{/other_user}","gists_url":"https://api.github.com/users/mcollina/gists{/gist_id}","starred_url":"https://api.github.com/users/mcollina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcollina/subscriptions","organizations_url":"https://api.github.com/users/mcollina/orgs","repos_url":"https://api.github.com/users/mcollina/repos","events_url":"https://api.github.com/users/mcollina/events{/privacy}","received_events_url":"https://api.github.com/users/mcollina/received_events","type":"User","site_admin":false},"body":"I fear this might cause some issue in the browser. Can you please check?\r\nOtherwise I would prefer to add it only if it is not a browser.","created_at":"2015-05-25T13:59:02Z","updated_at":"2015-05-25T13:59:02Z","html_url":"https://github.com/mqttjs/MQTT.js/pull/289#discussion_r30981056","pull_request_url":"https://api.github.com/repos/mqttjs/MQTT.js/pulls/289","_links":{"self":{"href":"https://api.github.com/repos/mqttjs/MQTT.js/pulls/comments/30981056"},"html":{"href":"https://github.com/mqttjs/MQTT.js/pull/289#discussion_r30981056"},"pull_request":{"href":"https://api.github.com/repos/mqttjs/MQTT.js/pulls/289"}}},"pull_request":{"url":"https://api.github.com/repos/mqttjs/MQTT.js/pulls/289","id":36141037,"html_url":"https://github.com/mqttjs/MQTT.js/pull/289","diff_url":"https://github.com/mqttjs/MQTT.js/pull/289.diff","patch_url":"https://github.com/mqttjs/MQTT.js/pull/289.patch","issue_url":"https://api.github.com/repos/mqttjs/MQTT.js/issues/289","number":289,"state":"open","locked":false,"title":"pass the option 'rejectUnauthorized' for self-sign certificate when using wss://URL","user":{"login":"ozboy","id":5944519,"avatar_url":"https://avatars.githubusercontent.com/u/5944519?v=3","gravatar_id":"","url":"https://api.github.com/users/ozboy","html_url":"https://github.com/ozboy","followers_url":"https://api.github.com/users/ozboy/followers","following_url":"https://api.github.com/users/ozboy/following{/other_user}","gists_url":"https://api.github.com/users/ozboy/gists{/gist_id}","starred_url":"https://api.github.com/users/ozboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozboy/subscriptions","organizations_url":"https://api.github.com/users/ozboy/orgs","repos_url":"https://api.github.com/users/ozboy/repos","events_url":"https://api.github.com/users/ozboy/events{/privacy}","received_events_url":"https://api.github.com/users/ozboy/received_events","type":"User","site_admin":false},"body":"pass the option 'rejectUnauthorized' for self-sign certificate when using wss://URL","created_at":"2015-05-25T13:54:35Z","updated_at":"2015-05-25T13:59:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d1827b30521bf119b5ada01b1d7ae549e28e591","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mqttjs/MQTT.js/pulls/289/commits","review_comments_url":"https://api.github.com/repos/mqttjs/MQTT.js/pulls/289/comments","review_comment_url":"https://api.github.com/repos/mqttjs/MQTT.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mqttjs/MQTT.js/issues/289/comments","statuses_url":"https://api.github.com/repos/mqttjs/MQTT.js/statuses/214a2847a0bdf7353bbe24a560c257ba0e9573c7","head":{"label":"ozboy:patch-1","ref":"patch-1","sha":"214a2847a0bdf7353bbe24a560c257ba0e9573c7","user":{"login":"ozboy","id":5944519,"avatar_url":"https://avatars.githubusercontent.com/u/5944519?v=3","gravatar_id":"","url":"https://api.github.com/users/ozboy","html_url":"https://github.com/ozboy","followers_url":"https://api.github.com/users/ozboy/followers","following_url":"https://api.github.com/users/ozboy/following{/other_user}","gists_url":"https://api.github.com/users/ozboy/gists{/gist_id}","starred_url":"https://api.github.com/users/ozboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozboy/subscriptions","organizations_url":"https://api.github.com/users/ozboy/orgs","repos_url":"https://api.github.com/users/ozboy/repos","events_url":"https://api.github.com/users/ozboy/events{/privacy}","received_events_url":"https://api.github.com/users/ozboy/received_events","type":"User","site_admin":false},"repo":{"id":36233740,"name":"MQTT.js","full_name":"ozboy/MQTT.js","owner":{"login":"ozboy","id":5944519,"avatar_url":"https://avatars.githubusercontent.com/u/5944519?v=3","gravatar_id":"","url":"https://api.github.com/users/ozboy","html_url":"https://github.com/ozboy","followers_url":"https://api.github.com/users/ozboy/followers","following_url":"https://api.github.com/users/ozboy/following{/other_user}","gists_url":"https://api.github.com/users/ozboy/gists{/gist_id}","starred_url":"https://api.github.com/users/ozboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozboy/subscriptions","organizations_url":"https://api.github.com/users/ozboy/orgs","repos_url":"https://api.github.com/users/ozboy/repos","events_url":"https://api.github.com/users/ozboy/events{/privacy}","received_events_url":"https://api.github.com/users/ozboy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ozboy/MQTT.js","description":"The MQTT client for Node.js and the browser","fork":true,"url":"https://api.github.com/repos/ozboy/MQTT.js","forks_url":"https://api.github.com/repos/ozboy/MQTT.js/forks","keys_url":"https://api.github.com/repos/ozboy/MQTT.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ozboy/MQTT.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ozboy/MQTT.js/teams","hooks_url":"https://api.github.com/repos/ozboy/MQTT.js/hooks","issue_events_url":"https://api.github.com/repos/ozboy/MQTT.js/issues/events{/number}","events_url":"https://api.github.com/repos/ozboy/MQTT.js/events","assignees_url":"https://api.github.com/repos/ozboy/MQTT.js/assignees{/user}","branches_url":"https://api.github.com/repos/ozboy/MQTT.js/branches{/branch}","tags_url":"https://api.github.com/repos/ozboy/MQTT.js/tags","blobs_url":"https://api.github.com/repos/ozboy/MQTT.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ozboy/MQTT.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ozboy/MQTT.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/ozboy/MQTT.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ozboy/MQTT.js/statuses/{sha}","languages_url":"https://api.github.com/repos/ozboy/MQTT.js/languages","stargazers_url":"https://api.github.com/repos/ozboy/MQTT.js/stargazers","contributors_url":"https://api.github.com/repos/ozboy/MQTT.js/contributors","subscribers_url":"https://api.github.com/repos/ozboy/MQTT.js/subscribers","subscription_url":"https://api.github.com/repos/ozboy/MQTT.js/subscription","commits_url":"https://api.github.com/repos/ozboy/MQTT.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/ozboy/MQTT.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/ozboy/MQTT.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/ozboy/MQTT.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/ozboy/MQTT.js/contents/{+path}","compare_url":"https://api.github.com/repos/ozboy/MQTT.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ozboy/MQTT.js/merges","archive_url":"https://api.github.com/repos/ozboy/MQTT.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ozboy/MQTT.js/downloads","issues_url":"https://api.github.com/repos/ozboy/MQTT.js/issues{/number}","pulls_url":"https://api.github.com/repos/ozboy/MQTT.js/pulls{/number}","milestones_url":"https://api.github.com/repos/ozboy/MQTT.js/milestones{/number}","notifications_url":"https://api.github.com/repos/ozboy/MQTT.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ozboy/MQTT.js/labels{/name}","releases_url":"https://api.github.com/repos/ozboy/MQTT.js/releases{/id}","created_at":"2015-05-25T13:48:22Z","updated_at":"2015-05-25T13:48:22Z","pushed_at":"2015-05-25T13:51:47Z","git_url":"git://github.com/ozboy/MQTT.js.git","ssh_url":"git@github.com:ozboy/MQTT.js.git","clone_url":"https://github.com/ozboy/MQTT.js.git","svn_url":"https://github.com/ozboy/MQTT.js","homepage":"","size":3107,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"mqttjs:master","ref":"master","sha":"0979cac28a710e81008c5a2e9dc03346297fc38b","user":{"login":"mqttjs","id":10424911,"avatar_url":"https://avatars.githubusercontent.com/u/10424911?v=3","gravatar_id":"","url":"https://api.github.com/users/mqttjs","html_url":"https://github.com/mqttjs","followers_url":"https://api.github.com/users/mqttjs/followers","following_url":"https://api.github.com/users/mqttjs/following{/other_user}","gists_url":"https://api.github.com/users/mqttjs/gists{/gist_id}","starred_url":"https://api.github.com/users/mqttjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mqttjs/subscriptions","organizations_url":"https://api.github.com/users/mqttjs/orgs","repos_url":"https://api.github.com/users/mqttjs/repos","events_url":"https://api.github.com/users/mqttjs/events{/privacy}","received_events_url":"https://api.github.com/users/mqttjs/received_events","type":"Organization","site_admin":false},"repo":{"id":1569980,"name":"MQTT.js","full_name":"mqttjs/MQTT.js","owner":{"login":"mqttjs","id":10424911,"avatar_url":"https://avatars.githubusercontent.com/u/10424911?v=3","gravatar_id":"","url":"https://api.github.com/users/mqttjs","html_url":"https://github.com/mqttjs","followers_url":"https://api.github.com/users/mqttjs/followers","following_url":"https://api.github.com/users/mqttjs/following{/other_user}","gists_url":"https://api.github.com/users/mqttjs/gists{/gist_id}","starred_url":"https://api.github.com/users/mqttjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mqttjs/subscriptions","organizations_url":"https://api.github.com/users/mqttjs/orgs","repos_url":"https://api.github.com/users/mqttjs/repos","events_url":"https://api.github.com/users/mqttjs/events{/privacy}","received_events_url":"https://api.github.com/users/mqttjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mqttjs/MQTT.js","description":"The MQTT client for Node.js and the browser","fork":false,"url":"https://api.github.com/repos/mqttjs/MQTT.js","forks_url":"https://api.github.com/repos/mqttjs/MQTT.js/forks","keys_url":"https://api.github.com/repos/mqttjs/MQTT.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mqttjs/MQTT.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mqttjs/MQTT.js/teams","hooks_url":"https://api.github.com/repos/mqttjs/MQTT.js/hooks","issue_events_url":"https://api.github.com/repos/mqttjs/MQTT.js/issues/events{/number}","events_url":"https://api.github.com/repos/mqttjs/MQTT.js/events","assignees_url":"https://api.github.com/repos/mqttjs/MQTT.js/assignees{/user}","branches_url":"https://api.github.com/repos/mqttjs/MQTT.js/branches{/branch}","tags_url":"https://api.github.com/repos/mqttjs/MQTT.js/tags","blobs_url":"https://api.github.com/repos/mqttjs/MQTT.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mqttjs/MQTT.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mqttjs/MQTT.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mqttjs/MQTT.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mqttjs/MQTT.js/statuses/{sha}","languages_url":"https://api.github.com/repos/mqttjs/MQTT.js/languages","stargazers_url":"https://api.github.com/repos/mqttjs/MQTT.js/stargazers","contributors_url":"https://api.github.com/repos/mqttjs/MQTT.js/contributors","subscribers_url":"https://api.github.com/repos/mqttjs/MQTT.js/subscribers","subscription_url":"https://api.github.com/repos/mqttjs/MQTT.js/subscription","commits_url":"https://api.github.com/repos/mqttjs/MQTT.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mqttjs/MQTT.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mqttjs/MQTT.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mqttjs/MQTT.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/mqttjs/MQTT.js/contents/{+path}","compare_url":"https://api.github.com/repos/mqttjs/MQTT.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mqttjs/MQTT.js/merges","archive_url":"https://api.github.com/repos/mqttjs/MQTT.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mqttjs/MQTT.js/downloads","issues_url":"https://api.github.com/repos/mqttjs/MQTT.js/issues{/number}","pulls_url":"https://api.github.com/repos/mqttjs/MQTT.js/pulls{/number}","milestones_url":"https://api.github.com/repos/mqttjs/MQTT.js/milestones{/number}","notifications_url":"https://api.github.com/repos/mqttjs/MQTT.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mqttjs/MQTT.js/labels{/name}","releases_url":"https://api.github.com/repos/mqttjs/MQTT.js/releases{/id}","created_at":"2011-04-05T00:33:23Z","updated_at":"2015-05-25T07:43:27Z","pushed_at":"2015-05-25T13:54:36Z","git_url":"git://github.com/mqttjs/MQTT.js.git","ssh_url":"git@github.com:mqttjs/MQTT.js.git","clone_url":"https://github.com/mqttjs/MQTT.js.git","svn_url":"https://github.com/mqttjs/MQTT.js","homepage":"","size":3107,"stargazers_count":804,"watchers_count":804,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":193,"mirror_url":null,"open_issues_count":15,"forks":193,"open_issues":15,"watchers":804,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mqttjs/MQTT.js/pulls/289"},"html":{"href":"https://github.com/mqttjs/MQTT.js/pull/289"},"issue":{"href":"https://api.github.com/repos/mqttjs/MQTT.js/issues/289"},"comments":{"href":"https://api.github.com/repos/mqttjs/MQTT.js/issues/289/comments"},"review_comments":{"href":"https://api.github.com/repos/mqttjs/MQTT.js/pulls/289/comments"},"review_comment":{"href":"https://api.github.com/repos/mqttjs/MQTT.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mqttjs/MQTT.js/pulls/289/commits"},"statuses":{"href":"https://api.github.com/repos/mqttjs/MQTT.js/statuses/214a2847a0bdf7353bbe24a560c257ba0e9573c7"}}}}