{"action":"created","comment":{"url":"https://api.github.com/repos/pulp/pulp/pulls/comments/48157005","id":48157005,"diff_hunk":"@@ -0,0 +1,143 @@\n+import os\n+\n+from django.http import \\\n+    HttpResponse, HttpResponseRedirect, HttpResponseNotFound, HttpResponseForbidden\n+from django.views.generic import View\n+\n+from pulp.common.config import parse_bool\n+from pulp.repoauth.wsgi import allow_access\n+from pulp.server.lazy import URL, Key\n+from pulp.server.config import config as pulp_conf\n+\n+\n+class ContentView(View):\n+    \"\"\"\n+    The content delivery view provides content.\n+\n+    :ivar key: The public RSA key used for URL signing.\n+    :type key: M2Crypto.RSA.RSA\n+    \"\"\"\n+\n+    @staticmethod\n+    def urljoin(scheme, host, port, base, path, query):\n+        \"\"\"\n+        Join a base URL and path component.","path":"server/pulp/server/content/web/views.py","position":24,"original_position":24,"commit_id":"819f8a88ad74e64bfdadf4b17fab62ffada91e9e","original_commit_id":"819f8a88ad74e64bfdadf4b17fab62ffada91e9e","user":{"login":"mhrivnak","id":53091,"avatar_url":"https://avatars.githubusercontent.com/u/53091?v=3","gravatar_id":"","url":"https://api.github.com/users/mhrivnak","html_url":"https://github.com/mhrivnak","followers_url":"https://api.github.com/users/mhrivnak/followers","following_url":"https://api.github.com/users/mhrivnak/following{/other_user}","gists_url":"https://api.github.com/users/mhrivnak/gists{/gist_id}","starred_url":"https://api.github.com/users/mhrivnak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhrivnak/subscriptions","organizations_url":"https://api.github.com/users/mhrivnak/orgs","repos_url":"https://api.github.com/users/mhrivnak/repos","events_url":"https://api.github.com/users/mhrivnak/events{/privacy}","received_events_url":"https://api.github.com/users/mhrivnak/received_events","type":"User","site_admin":false},"body":"This looks like a combination of ``urlunparse`` and ``urljoin`` from the ``urlparse`` module. Can you just call those two functions and let them handle the details?","created_at":"2015-12-21T15:40:42Z","updated_at":"2015-12-21T15:40:42Z","html_url":"https://github.com/pulp/pulp/pull/2278#discussion_r48157005","pull_request_url":"https://api.github.com/repos/pulp/pulp/pulls/2278","_links":{"self":{"href":"https://api.github.com/repos/pulp/pulp/pulls/comments/48157005"},"html":{"href":"https://github.com/pulp/pulp/pull/2278#discussion_r48157005"},"pull_request":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2278"}}},"pull_request":{"url":"https://api.github.com/repos/pulp/pulp/pulls/2278","id":54144451,"html_url":"https://github.com/pulp/pulp/pull/2278","diff_url":"https://github.com/pulp/pulp/pull/2278.diff","patch_url":"https://github.com/pulp/pulp/pull/2278.patch","issue_url":"https://api.github.com/repos/pulp/pulp/issues/2278","number":2278,"state":"open","locked":false,"title":"Lazy content","user":{"login":"jortel","id":1126767,"avatar_url":"https://avatars.githubusercontent.com/u/1126767?v=3","gravatar_id":"","url":"https://api.github.com/users/jortel","html_url":"https://github.com/jortel","followers_url":"https://api.github.com/users/jortel/followers","following_url":"https://api.github.com/users/jortel/following{/other_user}","gists_url":"https://api.github.com/users/jortel/gists{/gist_id}","starred_url":"https://api.github.com/users/jortel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jortel/subscriptions","organizations_url":"https://api.github.com/users/jortel/orgs","repos_url":"https://api.github.com/users/jortel/repos","events_url":"https://api.github.com/users/jortel/events{/privacy}","received_events_url":"https://api.github.com/users/jortel/received_events","type":"User","site_admin":false},"body":"https://pulp.plan.io/issues/1150\r\n\r\nSupport deferred (lazy) content downloading.  Major changes include:\r\n- Add streamer.\r\n- Add content API endpoint to redirect to the streamer.\r\n- Add importer configuration properties.\r\n- Add CLI support for *download policy* importer configuration properties.\r\n- Add downloading tasks\r\n- Add API to trigger downloading a repository.\r\n- Add controller methods to query to undownloaded units and download status of a repository.\r\n- Add signed URL.\r\n- Relax `create_symlink()` to create link to non-existent files.\r\n- Update content sources container to work in Twisted.\r\n- Changes to the data model:\r\n   - add catalog\r\n   - deferred downloading colleciton\r\n   - update content units\r\n\r\n","created_at":"2015-12-18T20:08:44Z","updated_at":"2015-12-21T15:40:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pulp/pulp/pulls/2278/commits","review_comments_url":"https://api.github.com/repos/pulp/pulp/pulls/2278/comments","review_comment_url":"https://api.github.com/repos/pulp/pulp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pulp/pulp/issues/2278/comments","statuses_url":"https://api.github.com/repos/pulp/pulp/statuses/819f8a88ad74e64bfdadf4b17fab62ffada91e9e","head":{"label":"pulp:lazy-content","ref":"lazy-content","sha":"819f8a88ad74e64bfdadf4b17fab62ffada91e9e","user":{"login":"pulp","id":2103606,"avatar_url":"https://avatars.githubusercontent.com/u/2103606?v=3","gravatar_id":"","url":"https://api.github.com/users/pulp","html_url":"https://github.com/pulp","followers_url":"https://api.github.com/users/pulp/followers","following_url":"https://api.github.com/users/pulp/following{/other_user}","gists_url":"https://api.github.com/users/pulp/gists{/gist_id}","starred_url":"https://api.github.com/users/pulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulp/subscriptions","organizations_url":"https://api.github.com/users/pulp/orgs","repos_url":"https://api.github.com/users/pulp/repos","events_url":"https://api.github.com/users/pulp/events{/privacy}","received_events_url":"https://api.github.com/users/pulp/received_events","type":"Organization","site_admin":false},"repo":{"id":5314652,"name":"pulp","full_name":"pulp/pulp","owner":{"login":"pulp","id":2103606,"avatar_url":"https://avatars.githubusercontent.com/u/2103606?v=3","gravatar_id":"","url":"https://api.github.com/users/pulp","html_url":"https://github.com/pulp","followers_url":"https://api.github.com/users/pulp/followers","following_url":"https://api.github.com/users/pulp/following{/other_user}","gists_url":"https://api.github.com/users/pulp/gists{/gist_id}","starred_url":"https://api.github.com/users/pulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulp/subscriptions","organizations_url":"https://api.github.com/users/pulp/orgs","repos_url":"https://api.github.com/users/pulp/repos","events_url":"https://api.github.com/users/pulp/events{/privacy}","received_events_url":"https://api.github.com/users/pulp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pulp/pulp","description":"Repository for Pulp platform code, including the server and base admin and consumer clients","fork":false,"url":"https://api.github.com/repos/pulp/pulp","forks_url":"https://api.github.com/repos/pulp/pulp/forks","keys_url":"https://api.github.com/repos/pulp/pulp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pulp/pulp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pulp/pulp/teams","hooks_url":"https://api.github.com/repos/pulp/pulp/hooks","issue_events_url":"https://api.github.com/repos/pulp/pulp/issues/events{/number}","events_url":"https://api.github.com/repos/pulp/pulp/events","assignees_url":"https://api.github.com/repos/pulp/pulp/assignees{/user}","branches_url":"https://api.github.com/repos/pulp/pulp/branches{/branch}","tags_url":"https://api.github.com/repos/pulp/pulp/tags","blobs_url":"https://api.github.com/repos/pulp/pulp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pulp/pulp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pulp/pulp/git/refs{/sha}","trees_url":"https://api.github.com/repos/pulp/pulp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pulp/pulp/statuses/{sha}","languages_url":"https://api.github.com/repos/pulp/pulp/languages","stargazers_url":"https://api.github.com/repos/pulp/pulp/stargazers","contributors_url":"https://api.github.com/repos/pulp/pulp/contributors","subscribers_url":"https://api.github.com/repos/pulp/pulp/subscribers","subscription_url":"https://api.github.com/repos/pulp/pulp/subscription","commits_url":"https://api.github.com/repos/pulp/pulp/commits{/sha}","git_commits_url":"https://api.github.com/repos/pulp/pulp/git/commits{/sha}","comments_url":"https://api.github.com/repos/pulp/pulp/comments{/number}","issue_comment_url":"https://api.github.com/repos/pulp/pulp/issues/comments{/number}","contents_url":"https://api.github.com/repos/pulp/pulp/contents/{+path}","compare_url":"https://api.github.com/repos/pulp/pulp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pulp/pulp/merges","archive_url":"https://api.github.com/repos/pulp/pulp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pulp/pulp/downloads","issues_url":"https://api.github.com/repos/pulp/pulp/issues{/number}","pulls_url":"https://api.github.com/repos/pulp/pulp/pulls{/number}","milestones_url":"https://api.github.com/repos/pulp/pulp/milestones{/number}","notifications_url":"https://api.github.com/repos/pulp/pulp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pulp/pulp/labels{/name}","releases_url":"https://api.github.com/repos/pulp/pulp/releases{/id}","created_at":"2012-08-06T13:49:20Z","updated_at":"2015-12-16T07:13:36Z","pushed_at":"2015-12-21T15:37:56Z","git_url":"git://github.com/pulp/pulp.git","ssh_url":"git@github.com:pulp/pulp.git","clone_url":"https://github.com/pulp/pulp.git","svn_url":"https://github.com/pulp/pulp","homepage":"","size":89308,"stargazers_count":234,"watchers_count":234,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":92,"mirror_url":null,"open_issues_count":14,"forks":92,"open_issues":14,"watchers":234,"default_branch":"master"}},"base":{"label":"pulp:master","ref":"master","sha":"4e5a3fa217465379c57dd3e4a0163e01ee2e668b","user":{"login":"pulp","id":2103606,"avatar_url":"https://avatars.githubusercontent.com/u/2103606?v=3","gravatar_id":"","url":"https://api.github.com/users/pulp","html_url":"https://github.com/pulp","followers_url":"https://api.github.com/users/pulp/followers","following_url":"https://api.github.com/users/pulp/following{/other_user}","gists_url":"https://api.github.com/users/pulp/gists{/gist_id}","starred_url":"https://api.github.com/users/pulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulp/subscriptions","organizations_url":"https://api.github.com/users/pulp/orgs","repos_url":"https://api.github.com/users/pulp/repos","events_url":"https://api.github.com/users/pulp/events{/privacy}","received_events_url":"https://api.github.com/users/pulp/received_events","type":"Organization","site_admin":false},"repo":{"id":5314652,"name":"pulp","full_name":"pulp/pulp","owner":{"login":"pulp","id":2103606,"avatar_url":"https://avatars.githubusercontent.com/u/2103606?v=3","gravatar_id":"","url":"https://api.github.com/users/pulp","html_url":"https://github.com/pulp","followers_url":"https://api.github.com/users/pulp/followers","following_url":"https://api.github.com/users/pulp/following{/other_user}","gists_url":"https://api.github.com/users/pulp/gists{/gist_id}","starred_url":"https://api.github.com/users/pulp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulp/subscriptions","organizations_url":"https://api.github.com/users/pulp/orgs","repos_url":"https://api.github.com/users/pulp/repos","events_url":"https://api.github.com/users/pulp/events{/privacy}","received_events_url":"https://api.github.com/users/pulp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pulp/pulp","description":"Repository for Pulp platform code, including the server and base admin and consumer clients","fork":false,"url":"https://api.github.com/repos/pulp/pulp","forks_url":"https://api.github.com/repos/pulp/pulp/forks","keys_url":"https://api.github.com/repos/pulp/pulp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pulp/pulp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pulp/pulp/teams","hooks_url":"https://api.github.com/repos/pulp/pulp/hooks","issue_events_url":"https://api.github.com/repos/pulp/pulp/issues/events{/number}","events_url":"https://api.github.com/repos/pulp/pulp/events","assignees_url":"https://api.github.com/repos/pulp/pulp/assignees{/user}","branches_url":"https://api.github.com/repos/pulp/pulp/branches{/branch}","tags_url":"https://api.github.com/repos/pulp/pulp/tags","blobs_url":"https://api.github.com/repos/pulp/pulp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pulp/pulp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pulp/pulp/git/refs{/sha}","trees_url":"https://api.github.com/repos/pulp/pulp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pulp/pulp/statuses/{sha}","languages_url":"https://api.github.com/repos/pulp/pulp/languages","stargazers_url":"https://api.github.com/repos/pulp/pulp/stargazers","contributors_url":"https://api.github.com/repos/pulp/pulp/contributors","subscribers_url":"https://api.github.com/repos/pulp/pulp/subscribers","subscription_url":"https://api.github.com/repos/pulp/pulp/subscription","commits_url":"https://api.github.com/repos/pulp/pulp/commits{/sha}","git_commits_url":"https://api.github.com/repos/pulp/pulp/git/commits{/sha}","comments_url":"https://api.github.com/repos/pulp/pulp/comments{/number}","issue_comment_url":"https://api.github.com/repos/pulp/pulp/issues/comments{/number}","contents_url":"https://api.github.com/repos/pulp/pulp/contents/{+path}","compare_url":"https://api.github.com/repos/pulp/pulp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pulp/pulp/merges","archive_url":"https://api.github.com/repos/pulp/pulp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pulp/pulp/downloads","issues_url":"https://api.github.com/repos/pulp/pulp/issues{/number}","pulls_url":"https://api.github.com/repos/pulp/pulp/pulls{/number}","milestones_url":"https://api.github.com/repos/pulp/pulp/milestones{/number}","notifications_url":"https://api.github.com/repos/pulp/pulp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pulp/pulp/labels{/name}","releases_url":"https://api.github.com/repos/pulp/pulp/releases{/id}","created_at":"2012-08-06T13:49:20Z","updated_at":"2015-12-16T07:13:36Z","pushed_at":"2015-12-21T15:37:56Z","git_url":"git://github.com/pulp/pulp.git","ssh_url":"git@github.com:pulp/pulp.git","clone_url":"https://github.com/pulp/pulp.git","svn_url":"https://github.com/pulp/pulp","homepage":"","size":89308,"stargazers_count":234,"watchers_count":234,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":92,"mirror_url":null,"open_issues_count":14,"forks":92,"open_issues":14,"watchers":234,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2278"},"html":{"href":"https://github.com/pulp/pulp/pull/2278"},"issue":{"href":"https://api.github.com/repos/pulp/pulp/issues/2278"},"comments":{"href":"https://api.github.com/repos/pulp/pulp/issues/2278/comments"},"review_comments":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2278/comments"},"review_comment":{"href":"https://api.github.com/repos/pulp/pulp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pulp/pulp/pulls/2278/commits"},"statuses":{"href":"https://api.github.com/repos/pulp/pulp/statuses/819f8a88ad74e64bfdadf4b17fab62ffada91e9e"}}}}