{"action":"created","comment":{"url":"https://api.github.com/repos/blockstack/blockstack-core/pulls/comments/184526285","pull_request_review_id":115742051,"id":184526285,"diff_hunk":"@@ -161,6 +162,18 @@ def scenario( wallets, **kw ):\n \n     # query each subdomain\n     proxy = testlib.make_proxy()\n+\n+    # test 301 redirects.\n+    res = testlib.blockstack_REST_call('GET', '/v1/names/baz.foo1.test', ses)\n+    if 'error' in res:\n+        res['test'] = 'Failed to query non-registered name.'\n+        print json.dumps(res)\n+        return False\n+    if res['http_status'] != 301:\n+        res['test'] = 'Failed to get a redirect.'\n+        print json.dumps(res)\n+        return False\n+","path":"integration_tests/blockstack_integration_tests/scenarios/name_pre_regup_subdomain_lookups.py","position":35,"original_position":35,"commit_id":"0e0da8ad22cf7f54a82bcec96b42f16909904c70","original_commit_id":"0e0da8ad22cf7f54a82bcec96b42f16909904c70","user":{"login":"jcnelson","id":459947,"avatar_url":"https://avatars0.githubusercontent.com/u/459947?v=4","gravatar_id":"","url":"https://api.github.com/users/jcnelson","html_url":"https://github.com/jcnelson","followers_url":"https://api.github.com/users/jcnelson/followers","following_url":"https://api.github.com/users/jcnelson/following{/other_user}","gists_url":"https://api.github.com/users/jcnelson/gists{/gist_id}","starred_url":"https://api.github.com/users/jcnelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcnelson/subscriptions","organizations_url":"https://api.github.com/users/jcnelson/orgs","repos_url":"https://api.github.com/users/jcnelson/repos","events_url":"https://api.github.com/users/jcnelson/events{/privacy}","received_events_url":"https://api.github.com/users/jcnelson/received_events","type":"User","site_admin":false},"body":"For completeness, can you also have this test case do the following?\r\n* spawn a subdomain registrar\r\n* register a subdomain via the subdomain registrar (so it's in its queue)\r\n* use `blockstack_REST_call()` to fetch it via the subdomain registrar (i.e. ensuring that the 301 correctly connects `requests` to the subdomain registrar and serves back the subdomain state)","created_at":"2018-04-26T20:48:49Z","updated_at":"2018-04-26T20:58:12Z","html_url":"https://github.com/blockstack/blockstack-core/pull/805#discussion_r184526285","pull_request_url":"https://api.github.com/repos/blockstack/blockstack-core/pulls/805","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/blockstack/blockstack-core/pulls/comments/184526285"},"html":{"href":"https://github.com/blockstack/blockstack-core/pull/805#discussion_r184526285"},"pull_request":{"href":"https://api.github.com/repos/blockstack/blockstack-core/pulls/805"}}},"pull_request":{"url":"https://api.github.com/repos/blockstack/blockstack-core/pulls/805","id":184456362,"html_url":"https://github.com/blockstack/blockstack-core/pull/805","diff_url":"https://github.com/blockstack/blockstack-core/pull/805.diff","patch_url":"https://github.com/blockstack/blockstack-core/pull/805.patch","issue_url":"https://api.github.com/repos/blockstack/blockstack-core/issues/805","number":805,"state":"open","locked":false,"title":"Feature: Redirect for pending subdomains","user":{"login":"kantai","id":1153552,"avatar_url":"https://avatars1.githubusercontent.com/u/1153552?v=4","gravatar_id":"","url":"https://api.github.com/users/kantai","html_url":"https://github.com/kantai","followers_url":"https://api.github.com/users/kantai/followers","following_url":"https://api.github.com/users/kantai/following{/other_user}","gists_url":"https://api.github.com/users/kantai/gists{/gist_id}","starred_url":"https://api.github.com/users/kantai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kantai/subscriptions","organizations_url":"https://api.github.com/users/kantai/orgs","repos_url":"https://api.github.com/users/kantai/repos","events_url":"https://api.github.com/users/kantai/events{/privacy}","received_events_url":"https://api.github.com/users/kantai/received_events","type":"User","site_admin":false},"body":"This changes the behavior of the API endpoint to return a 301 HTTP redirect when it gets a `/v1/names` request for a not-yet-registered subdomain.\r\n\r\nIt looks up the domain's zonefile, reads the `_resolver` URI and redirects to the `/v1/names` endpoint listed there. If no such URI exists, or the api endpoint fails to read the zonefile, it responds with 404 (as it did before), with a `more` field with a little more information about the failure.\r\n\r\nThis implements the blockstack-core side of #750 \r\n\r\nThe integration test `name_pre_regup_subdomain_lookups.py` was modified to test for the 301 redirection.","created_at":"2018-04-26T20:34:36Z","updated_at":"2018-04-26T20:58:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c3016eaa72b0ab7fd8eeaac9e65e79be8d0fd8e","assignee":{"login":"kantai","id":1153552,"avatar_url":"https://avatars1.githubusercontent.com/u/1153552?v=4","gravatar_id":"","url":"https://api.github.com/users/kantai","html_url":"https://github.com/kantai","followers_url":"https://api.github.com/users/kantai/followers","following_url":"https://api.github.com/users/kantai/following{/other_user}","gists_url":"https://api.github.com/users/kantai/gists{/gist_id}","starred_url":"https://api.github.com/users/kantai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kantai/subscriptions","organizations_url":"https://api.github.com/users/kantai/orgs","repos_url":"https://api.github.com/users/kantai/repos","events_url":"https://api.github.com/users/kantai/events{/privacy}","received_events_url":"https://api.github.com/users/kantai/received_events","type":"User","site_admin":false},"assignees":[{"login":"kantai","id":1153552,"avatar_url":"https://avatars1.githubusercontent.com/u/1153552?v=4","gravatar_id":"","url":"https://api.github.com/users/kantai","html_url":"https://github.com/kantai","followers_url":"https://api.github.com/users/kantai/followers","following_url":"https://api.github.com/users/kantai/following{/other_user}","gists_url":"https://api.github.com/users/kantai/gists{/gist_id}","starred_url":"https://api.github.com/users/kantai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kantai/subscriptions","organizations_url":"https://api.github.com/users/kantai/orgs","repos_url":"https://api.github.com/users/kantai/repos","events_url":"https://api.github.com/users/kantai/events{/privacy}","received_events_url":"https://api.github.com/users/kantai/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":807903877,"url":"https://api.github.com/repos/blockstack/blockstack-core/labels/area/api","name":"area/api","color":"0052cc","default":false},{"id":807896364,"url":"https://api.github.com/repos/blockstack/blockstack-core/labels/area/subdomain","name":"area/subdomain","color":"1d76db","default":false},{"id":807891806,"url":"https://api.github.com/repos/blockstack/blockstack-core/labels/kind/enhancement","name":"kind/enhancement","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/blockstack/blockstack-core/pulls/805/commits","review_comments_url":"https://api.github.com/repos/blockstack/blockstack-core/pulls/805/comments","review_comment_url":"https://api.github.com/repos/blockstack/blockstack-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/blockstack/blockstack-core/issues/805/comments","statuses_url":"https://api.github.com/repos/blockstack/blockstack-core/statuses/0e0da8ad22cf7f54a82bcec96b42f16909904c70","head":{"label":"blockstack:feature/301-pending-subdomains","ref":"feature/301-pending-subdomains","sha":"0e0da8ad22cf7f54a82bcec96b42f16909904c70","user":{"login":"blockstack","id":8165984,"avatar_url":"https://avatars0.githubusercontent.com/u/8165984?v=4","gravatar_id":"","url":"https://api.github.com/users/blockstack","html_url":"https://github.com/blockstack","followers_url":"https://api.github.com/users/blockstack/followers","following_url":"https://api.github.com/users/blockstack/following{/other_user}","gists_url":"https://api.github.com/users/blockstack/gists{/gist_id}","starred_url":"https://api.github.com/users/blockstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blockstack/subscriptions","organizations_url":"https://api.github.com/users/blockstack/orgs","repos_url":"https://api.github.com/users/blockstack/repos","events_url":"https://api.github.com/users/blockstack/events{/privacy}","received_events_url":"https://api.github.com/users/blockstack/received_events","type":"Organization","site_admin":false},"repo":{"id":24375248,"name":"blockstack-core","full_name":"blockstack/blockstack-core","owner":{"login":"blockstack","id":8165984,"avatar_url":"https://avatars0.githubusercontent.com/u/8165984?v=4","gravatar_id":"","url":"https://api.github.com/users/blockstack","html_url":"https://github.com/blockstack","followers_url":"https://api.github.com/users/blockstack/followers","following_url":"https://api.github.com/users/blockstack/following{/other_user}","gists_url":"https://api.github.com/users/blockstack/gists{/gist_id}","starred_url":"https://api.github.com/users/blockstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blockstack/subscriptions","organizations_url":"https://api.github.com/users/blockstack/orgs","repos_url":"https://api.github.com/users/blockstack/repos","events_url":"https://api.github.com/users/blockstack/events{/privacy}","received_events_url":"https://api.github.com/users/blockstack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/blockstack/blockstack-core","description":"The reference implementation of Blockstack","fork":false,"url":"https://api.github.com/repos/blockstack/blockstack-core","forks_url":"https://api.github.com/repos/blockstack/blockstack-core/forks","keys_url":"https://api.github.com/repos/blockstack/blockstack-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blockstack/blockstack-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blockstack/blockstack-core/teams","hooks_url":"https://api.github.com/repos/blockstack/blockstack-core/hooks","issue_events_url":"https://api.github.com/repos/blockstack/blockstack-core/issues/events{/number}","events_url":"https://api.github.com/repos/blockstack/blockstack-core/events","assignees_url":"https://api.github.com/repos/blockstack/blockstack-core/assignees{/user}","branches_url":"https://api.github.com/repos/blockstack/blockstack-core/branches{/branch}","tags_url":"https://api.github.com/repos/blockstack/blockstack-core/tags","blobs_url":"https://api.github.com/repos/blockstack/blockstack-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blockstack/blockstack-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blockstack/blockstack-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/blockstack/blockstack-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blockstack/blockstack-core/statuses/{sha}","languages_url":"https://api.github.com/repos/blockstack/blockstack-core/languages","stargazers_url":"https://api.github.com/repos/blockstack/blockstack-core/stargazers","contributors_url":"https://api.github.com/repos/blockstack/blockstack-core/contributors","subscribers_url":"https://api.github.com/repos/blockstack/blockstack-core/subscribers","subscription_url":"https://api.github.com/repos/blockstack/blockstack-core/subscription","commits_url":"https://api.github.com/repos/blockstack/blockstack-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/blockstack/blockstack-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/blockstack/blockstack-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/blockstack/blockstack-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/blockstack/blockstack-core/contents/{+path}","compare_url":"https://api.github.com/repos/blockstack/blockstack-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blockstack/blockstack-core/merges","archive_url":"https://api.github.com/repos/blockstack/blockstack-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blockstack/blockstack-core/downloads","issues_url":"https://api.github.com/repos/blockstack/blockstack-core/issues{/number}","pulls_url":"https://api.github.com/repos/blockstack/blockstack-core/pulls{/number}","milestones_url":"https://api.github.com/repos/blockstack/blockstack-core/milestones{/number}","notifications_url":"https://api.github.com/repos/blockstack/blockstack-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blockstack/blockstack-core/labels{/name}","releases_url":"https://api.github.com/repos/blockstack/blockstack-core/releases{/id}","deployments_url":"https://api.github.com/repos/blockstack/blockstack-core/deployments","created_at":"2014-09-23T14:40:43Z","updated_at":"2018-04-26T01:16:55Z","pushed_at":"2018-04-26T20:34:36Z","git_url":"git://github.com/blockstack/blockstack-core.git","ssh_url":"git@github.com:blockstack/blockstack-core.git","clone_url":"https://github.com/blockstack/blockstack-core.git","svn_url":"https://github.com/blockstack/blockstack-core","homepage":"http://blockstack.org","size":24979,"stargazers_count":1576,"watchers_count":1576,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":245,"mirror_url":null,"archived":false,"open_issues_count":71,"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":245,"open_issues":71,"watchers":1576,"default_branch":"master"}},"base":{"label":"blockstack:develop","ref":"develop","sha":"d7917fd7371aadae1f3a8c23edae0864155caac0","user":{"login":"blockstack","id":8165984,"avatar_url":"https://avatars0.githubusercontent.com/u/8165984?v=4","gravatar_id":"","url":"https://api.github.com/users/blockstack","html_url":"https://github.com/blockstack","followers_url":"https://api.github.com/users/blockstack/followers","following_url":"https://api.github.com/users/blockstack/following{/other_user}","gists_url":"https://api.github.com/users/blockstack/gists{/gist_id}","starred_url":"https://api.github.com/users/blockstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blockstack/subscriptions","organizations_url":"https://api.github.com/users/blockstack/orgs","repos_url":"https://api.github.com/users/blockstack/repos","events_url":"https://api.github.com/users/blockstack/events{/privacy}","received_events_url":"https://api.github.com/users/blockstack/received_events","type":"Organization","site_admin":false},"repo":{"id":24375248,"name":"blockstack-core","full_name":"blockstack/blockstack-core","owner":{"login":"blockstack","id":8165984,"avatar_url":"https://avatars0.githubusercontent.com/u/8165984?v=4","gravatar_id":"","url":"https://api.github.com/users/blockstack","html_url":"https://github.com/blockstack","followers_url":"https://api.github.com/users/blockstack/followers","following_url":"https://api.github.com/users/blockstack/following{/other_user}","gists_url":"https://api.github.com/users/blockstack/gists{/gist_id}","starred_url":"https://api.github.com/users/blockstack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blockstack/subscriptions","organizations_url":"https://api.github.com/users/blockstack/orgs","repos_url":"https://api.github.com/users/blockstack/repos","events_url":"https://api.github.com/users/blockstack/events{/privacy}","received_events_url":"https://api.github.com/users/blockstack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/blockstack/blockstack-core","description":"The reference implementation of Blockstack","fork":false,"url":"https://api.github.com/repos/blockstack/blockstack-core","forks_url":"https://api.github.com/repos/blockstack/blockstack-core/forks","keys_url":"https://api.github.com/repos/blockstack/blockstack-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blockstack/blockstack-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blockstack/blockstack-core/teams","hooks_url":"https://api.github.com/repos/blockstack/blockstack-core/hooks","issue_events_url":"https://api.github.com/repos/blockstack/blockstack-core/issues/events{/number}","events_url":"https://api.github.com/repos/blockstack/blockstack-core/events","assignees_url":"https://api.github.com/repos/blockstack/blockstack-core/assignees{/user}","branches_url":"https://api.github.com/repos/blockstack/blockstack-core/branches{/branch}","tags_url":"https://api.github.com/repos/blockstack/blockstack-core/tags","blobs_url":"https://api.github.com/repos/blockstack/blockstack-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blockstack/blockstack-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blockstack/blockstack-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/blockstack/blockstack-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blockstack/blockstack-core/statuses/{sha}","languages_url":"https://api.github.com/repos/blockstack/blockstack-core/languages","stargazers_url":"https://api.github.com/repos/blockstack/blockstack-core/stargazers","contributors_url":"https://api.github.com/repos/blockstack/blockstack-core/contributors","subscribers_url":"https://api.github.com/repos/blockstack/blockstack-core/subscribers","subscription_url":"https://api.github.com/repos/blockstack/blockstack-core/subscription","commits_url":"https://api.github.com/repos/blockstack/blockstack-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/blockstack/blockstack-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/blockstack/blockstack-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/blockstack/blockstack-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/blockstack/blockstack-core/contents/{+path}","compare_url":"https://api.github.com/repos/blockstack/blockstack-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blockstack/blockstack-core/merges","archive_url":"https://api.github.com/repos/blockstack/blockstack-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blockstack/blockstack-core/downloads","issues_url":"https://api.github.com/repos/blockstack/blockstack-core/issues{/number}","pulls_url":"https://api.github.com/repos/blockstack/blockstack-core/pulls{/number}","milestones_url":"https://api.github.com/repos/blockstack/blockstack-core/milestones{/number}","notifications_url":"https://api.github.com/repos/blockstack/blockstack-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blockstack/blockstack-core/labels{/name}","releases_url":"https://api.github.com/repos/blockstack/blockstack-core/releases{/id}","deployments_url":"https://api.github.com/repos/blockstack/blockstack-core/deployments","created_at":"2014-09-23T14:40:43Z","updated_at":"2018-04-26T01:16:55Z","pushed_at":"2018-04-26T20:34:36Z","git_url":"git://github.com/blockstack/blockstack-core.git","ssh_url":"git@github.com:blockstack/blockstack-core.git","clone_url":"https://github.com/blockstack/blockstack-core.git","svn_url":"https://github.com/blockstack/blockstack-core","homepage":"http://blockstack.org","size":24979,"stargazers_count":1576,"watchers_count":1576,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":245,"mirror_url":null,"archived":false,"open_issues_count":71,"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":245,"open_issues":71,"watchers":1576,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/blockstack/blockstack-core/pulls/805"},"html":{"href":"https://github.com/blockstack/blockstack-core/pull/805"},"issue":{"href":"https://api.github.com/repos/blockstack/blockstack-core/issues/805"},"comments":{"href":"https://api.github.com/repos/blockstack/blockstack-core/issues/805/comments"},"review_comments":{"href":"https://api.github.com/repos/blockstack/blockstack-core/pulls/805/comments"},"review_comment":{"href":"https://api.github.com/repos/blockstack/blockstack-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/blockstack/blockstack-core/pulls/805/commits"},"statuses":{"href":"https://api.github.com/repos/blockstack/blockstack-core/statuses/0e0da8ad22cf7f54a82bcec96b42f16909904c70"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jcnelson"}}