{"action":"created","comment":{"url":"https://api.github.com/repos/ably/ably-js/pulls/comments/75101843","id":75101843,"diff_hunk":"@@ -3,6 +3,16 @@ var Http = (function() {\n \n \tfunction Http() {}\n \n+\tfunction shouldFallback(err) {\n+\t\tvar statusCode = err.statusCode;\n+\t\t/* 400 + no code = a generic xhr onerror. Browser doesn't give us enough\n+\t\t * detail to know whether it's fallback-fixable, but it may be (eg if a\n+\t\t * network issue), so try just in case */\n+\t\treturn (statusCode === 408 && !err.code) ||\n+\t\t\t(statusCode === 400 && !err.code)      ||","path":"browser/lib/util/http.js","position":10,"original_position":10,"commit_id":"cf5190c305f7638a7bd1106259aa42630c563621","original_commit_id":"cf5190c305f7638a7bd1106259aa42630c563621","user":{"login":"SimonWoolf","id":5908687,"avatar_url":"https://avatars.githubusercontent.com/u/5908687?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonWoolf","html_url":"https://github.com/SimonWoolf","followers_url":"https://api.github.com/users/SimonWoolf/followers","following_url":"https://api.github.com/users/SimonWoolf/following{/other_user}","gists_url":"https://api.github.com/users/SimonWoolf/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonWoolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonWoolf/subscriptions","organizations_url":"https://api.github.com/users/SimonWoolf/orgs","repos_url":"https://api.github.com/users/SimonWoolf/repos","events_url":"https://api.github.com/users/SimonWoolf/events{/privacy}","received_events_url":"https://api.github.com/users/SimonWoolf/received_events","type":"User","site_admin":false},"body":"Heh. Lines up correctly if viewed in an editor with tabstop=2 :P\r\n\r\nlining up things on different levels of indentation when indented with tabs and the tabwidth might change isn't possible in general, but I'll kludge it with spaces...","created_at":"2016-08-17T11:00:06Z","updated_at":"2016-08-17T11:00:06Z","html_url":"https://github.com/ably/ably-js/pull/327#discussion_r75101843","pull_request_url":"https://api.github.com/repos/ably/ably-js/pulls/327","_links":{"self":{"href":"https://api.github.com/repos/ably/ably-js/pulls/comments/75101843"},"html":{"href":"https://github.com/ably/ably-js/pull/327#discussion_r75101843"},"pull_request":{"href":"https://api.github.com/repos/ably/ably-js/pulls/327"}}},"pull_request":{"url":"https://api.github.com/repos/ably/ably-js/pulls/327","id":81560016,"html_url":"https://github.com/ably/ably-js/pull/327","diff_url":"https://github.com/ably/ably-js/pull/327.diff","patch_url":"https://github.com/ably/ably-js/pull/327.patch","issue_url":"https://api.github.com/repos/ably/ably-js/issues/327","number":327,"state":"open","locked":false,"title":"Fix rest fallback hosts functionality","user":{"login":"SimonWoolf","id":5908687,"avatar_url":"https://avatars.githubusercontent.com/u/5908687?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonWoolf","html_url":"https://github.com/SimonWoolf","followers_url":"https://api.github.com/users/SimonWoolf/followers","following_url":"https://api.github.com/users/SimonWoolf/following{/other_user}","gists_url":"https://api.github.com/users/SimonWoolf/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonWoolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonWoolf/subscriptions","organizations_url":"https://api.github.com/users/SimonWoolf/orgs","repos_url":"https://api.github.com/users/SimonWoolf/repos","events_url":"https://api.github.com/users/SimonWoolf/events{/privacy}","received_events_url":"https://api.github.com/users/SimonWoolf/received_events","type":"User","site_admin":false},"body":"@mattheworiordan PR relevant to https://support.ably.io/helpdesk/tickets/1242 . Turns out ably-js never properly implemented the rest fallback spec in a bunch of ways. Fixed and added some tests.\r\n\r\nDid it against the 0-9-spec branch because the new rest#request functionality was useful for writing the tests. I can backport the fixes to 0.8 you think we should do that, once the PR's been reviewed.","created_at":"2016-08-16T23:07:18Z","updated_at":"2016-08-17T11:00:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8edad4bb6e560ec53bd804880644a427675707b0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ably/ably-js/pulls/327/commits","review_comments_url":"https://api.github.com/repos/ably/ably-js/pulls/327/comments","review_comment_url":"https://api.github.com/repos/ably/ably-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ably/ably-js/issues/327/comments","statuses_url":"https://api.github.com/repos/ably/ably-js/statuses/cf5190c305f7638a7bd1106259aa42630c563621","head":{"label":"ably:rest-fallback-hosts","ref":"rest-fallback-hosts","sha":"cf5190c305f7638a7bd1106259aa42630c563621","user":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"repo":{"id":6676523,"name":"ably-js","full_name":"ably/ably-js","owner":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ably/ably-js","description":"Ably Realtime Messaging Javascript library to connect from your browser or Node.js","fork":false,"url":"https://api.github.com/repos/ably/ably-js","forks_url":"https://api.github.com/repos/ably/ably-js/forks","keys_url":"https://api.github.com/repos/ably/ably-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ably/ably-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ably/ably-js/teams","hooks_url":"https://api.github.com/repos/ably/ably-js/hooks","issue_events_url":"https://api.github.com/repos/ably/ably-js/issues/events{/number}","events_url":"https://api.github.com/repos/ably/ably-js/events","assignees_url":"https://api.github.com/repos/ably/ably-js/assignees{/user}","branches_url":"https://api.github.com/repos/ably/ably-js/branches{/branch}","tags_url":"https://api.github.com/repos/ably/ably-js/tags","blobs_url":"https://api.github.com/repos/ably/ably-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ably/ably-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ably/ably-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/ably/ably-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ably/ably-js/statuses/{sha}","languages_url":"https://api.github.com/repos/ably/ably-js/languages","stargazers_url":"https://api.github.com/repos/ably/ably-js/stargazers","contributors_url":"https://api.github.com/repos/ably/ably-js/contributors","subscribers_url":"https://api.github.com/repos/ably/ably-js/subscribers","subscription_url":"https://api.github.com/repos/ably/ably-js/subscription","commits_url":"https://api.github.com/repos/ably/ably-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/ably/ably-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/ably/ably-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/ably/ably-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/ably/ably-js/contents/{+path}","compare_url":"https://api.github.com/repos/ably/ably-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ably/ably-js/merges","archive_url":"https://api.github.com/repos/ably/ably-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ably/ably-js/downloads","issues_url":"https://api.github.com/repos/ably/ably-js/issues{/number}","pulls_url":"https://api.github.com/repos/ably/ably-js/pulls{/number}","milestones_url":"https://api.github.com/repos/ably/ably-js/milestones{/number}","notifications_url":"https://api.github.com/repos/ably/ably-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ably/ably-js/labels{/name}","releases_url":"https://api.github.com/repos/ably/ably-js/releases{/id}","deployments_url":"https://api.github.com/repos/ably/ably-js/deployments","created_at":"2012-11-13T19:41:13Z","updated_at":"2016-08-16T10:52:50Z","pushed_at":"2016-08-16T23:07:18Z","git_url":"git://github.com/ably/ably-js.git","ssh_url":"git@github.com:ably/ably-js.git","clone_url":"https://github.com/ably/ably-js.git","svn_url":"https://github.com/ably/ably-js","homepage":null,"size":14211,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":41,"forks":5,"open_issues":41,"watchers":13,"default_branch":"master"}},"base":{"label":"ably:0-9-spec","ref":"0-9-spec","sha":"e5fc460283db5a11c8c0c3403532e51bce104198","user":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"repo":{"id":6676523,"name":"ably-js","full_name":"ably/ably-js","owner":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ably/ably-js","description":"Ably Realtime Messaging Javascript library to connect from your browser or Node.js","fork":false,"url":"https://api.github.com/repos/ably/ably-js","forks_url":"https://api.github.com/repos/ably/ably-js/forks","keys_url":"https://api.github.com/repos/ably/ably-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ably/ably-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ably/ably-js/teams","hooks_url":"https://api.github.com/repos/ably/ably-js/hooks","issue_events_url":"https://api.github.com/repos/ably/ably-js/issues/events{/number}","events_url":"https://api.github.com/repos/ably/ably-js/events","assignees_url":"https://api.github.com/repos/ably/ably-js/assignees{/user}","branches_url":"https://api.github.com/repos/ably/ably-js/branches{/branch}","tags_url":"https://api.github.com/repos/ably/ably-js/tags","blobs_url":"https://api.github.com/repos/ably/ably-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ably/ably-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ably/ably-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/ably/ably-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ably/ably-js/statuses/{sha}","languages_url":"https://api.github.com/repos/ably/ably-js/languages","stargazers_url":"https://api.github.com/repos/ably/ably-js/stargazers","contributors_url":"https://api.github.com/repos/ably/ably-js/contributors","subscribers_url":"https://api.github.com/repos/ably/ably-js/subscribers","subscription_url":"https://api.github.com/repos/ably/ably-js/subscription","commits_url":"https://api.github.com/repos/ably/ably-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/ably/ably-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/ably/ably-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/ably/ably-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/ably/ably-js/contents/{+path}","compare_url":"https://api.github.com/repos/ably/ably-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ably/ably-js/merges","archive_url":"https://api.github.com/repos/ably/ably-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ably/ably-js/downloads","issues_url":"https://api.github.com/repos/ably/ably-js/issues{/number}","pulls_url":"https://api.github.com/repos/ably/ably-js/pulls{/number}","milestones_url":"https://api.github.com/repos/ably/ably-js/milestones{/number}","notifications_url":"https://api.github.com/repos/ably/ably-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ably/ably-js/labels{/name}","releases_url":"https://api.github.com/repos/ably/ably-js/releases{/id}","deployments_url":"https://api.github.com/repos/ably/ably-js/deployments","created_at":"2012-11-13T19:41:13Z","updated_at":"2016-08-16T10:52:50Z","pushed_at":"2016-08-16T23:07:18Z","git_url":"git://github.com/ably/ably-js.git","ssh_url":"git@github.com:ably/ably-js.git","clone_url":"https://github.com/ably/ably-js.git","svn_url":"https://github.com/ably/ably-js","homepage":null,"size":14211,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":41,"forks":5,"open_issues":41,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ably/ably-js/pulls/327"},"html":{"href":"https://github.com/ably/ably-js/pull/327"},"issue":{"href":"https://api.github.com/repos/ably/ably-js/issues/327"},"comments":{"href":"https://api.github.com/repos/ably/ably-js/issues/327/comments"},"review_comments":{"href":"https://api.github.com/repos/ably/ably-js/pulls/327/comments"},"review_comment":{"href":"https://api.github.com/repos/ably/ably-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ably/ably-js/pulls/327/commits"},"statuses":{"href":"https://api.github.com/repos/ably/ably-js/statuses/cf5190c305f7638a7bd1106259aa42630c563621"}}}}
{"actor":{"display_login":"SimonWoolf"}}