{"action":"created","comment":{"url":"https://api.github.com/repos/Pylons/pyramid/pulls/comments/47584985","id":47584985,"diff_hunk":"@@ -96,19 +96,17 @@ def _partial_application_url(self, scheme=None, host=None, port=None):\n             if scheme == 'http':\n                 if port is None:\n                     port = '80'\n-        url = scheme + '://'\n-        if port is not None:\n-            port = str(port)\n         if host is None:\n             host = e.get('HTTP_HOST')\n-        if host is None:\n-            host = e['SERVER_NAME']\n+            if host is None:\n+                host = e['SERVER_NAME']\n         if port is None:\n             if ':' in host:\n                 host, port = host.split(':', 1)\n             else:\n                 port = e['SERVER_PORT']\n         else:\n+            port = str(port)","path":"pyramid/url.py","position":19,"original_position":19,"commit_id":"b4fcff0471e16b6dab3a685df970bca712c5cb3b","original_commit_id":"b4fcff0471e16b6dab3a685df970bca712c5cb3b","user":{"login":"stevepiercy","id":102112,"avatar_url":"https://avatars.githubusercontent.com/u/102112?v=3","gravatar_id":"","url":"https://api.github.com/users/stevepiercy","html_url":"https://github.com/stevepiercy","followers_url":"https://api.github.com/users/stevepiercy/followers","following_url":"https://api.github.com/users/stevepiercy/following{/other_user}","gists_url":"https://api.github.com/users/stevepiercy/gists{/gist_id}","starred_url":"https://api.github.com/users/stevepiercy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevepiercy/subscriptions","organizations_url":"https://api.github.com/users/stevepiercy/orgs","repos_url":"https://api.github.com/users/stevepiercy/repos","events_url":"https://api.github.com/users/stevepiercy/events{/privacy}","received_events_url":"https://api.github.com/users/stevepiercy/received_events","type":"User","site_admin":false},"body":"Why is this line necessary? Please provide a test to prove its necessity.","created_at":"2015-12-15T01:12:39Z","updated_at":"2015-12-15T01:12:39Z","html_url":"https://github.com/Pylons/pyramid/pull/2178#discussion_r47584985","pull_request_url":"https://api.github.com/repos/Pylons/pyramid/pulls/2178","_links":{"self":{"href":"https://api.github.com/repos/Pylons/pyramid/pulls/comments/47584985"},"html":{"href":"https://github.com/Pylons/pyramid/pull/2178#discussion_r47584985"},"pull_request":{"href":"https://api.github.com/repos/Pylons/pyramid/pulls/2178"}}},"pull_request":{"url":"https://api.github.com/repos/Pylons/pyramid/pulls/2178","id":53474206,"html_url":"https://github.com/Pylons/pyramid/pull/2178","diff_url":"https://github.com/Pylons/pyramid/pull/2178.diff","patch_url":"https://github.com/Pylons/pyramid/pull/2178.patch","issue_url":"https://api.github.com/repos/Pylons/pyramid/issues/2178","number":2178,"state":"open","locked":false,"title":"Update url.py","user":{"login":"srisankethu","id":12644108,"avatar_url":"https://avatars.githubusercontent.com/u/12644108?v=3","gravatar_id":"","url":"https://api.github.com/users/srisankethu","html_url":"https://github.com/srisankethu","followers_url":"https://api.github.com/users/srisankethu/followers","following_url":"https://api.github.com/users/srisankethu/following{/other_user}","gists_url":"https://api.github.com/users/srisankethu/gists{/gist_id}","starred_url":"https://api.github.com/users/srisankethu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srisankethu/subscriptions","organizations_url":"https://api.github.com/users/srisankethu/orgs","repos_url":"https://api.github.com/users/srisankethu/repos","events_url":"https://api.github.com/users/srisankethu/events{/privacy}","received_events_url":"https://api.github.com/users/srisankethu/received_events","type":"User","site_admin":false},"body":"Just made a few changes like in line 104,105 is nested under  if statement in line 102\r\n\r\nif port is not None: statement in line 100 is added to else: statement in line 111\r\n\r\nCombined url=... from line 99 and 120","created_at":"2015-12-12T11:19:46Z","updated_at":"2015-12-15T01:12:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b3cf244363b1be04017e9ddea7a8a15618cea41","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Pylons/pyramid/pulls/2178/commits","review_comments_url":"https://api.github.com/repos/Pylons/pyramid/pulls/2178/comments","review_comment_url":"https://api.github.com/repos/Pylons/pyramid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Pylons/pyramid/issues/2178/comments","statuses_url":"https://api.github.com/repos/Pylons/pyramid/statuses/b4fcff0471e16b6dab3a685df970bca712c5cb3b","head":{"label":"srisankethu:patch-1","ref":"patch-1","sha":"b4fcff0471e16b6dab3a685df970bca712c5cb3b","user":{"login":"srisankethu","id":12644108,"avatar_url":"https://avatars.githubusercontent.com/u/12644108?v=3","gravatar_id":"","url":"https://api.github.com/users/srisankethu","html_url":"https://github.com/srisankethu","followers_url":"https://api.github.com/users/srisankethu/followers","following_url":"https://api.github.com/users/srisankethu/following{/other_user}","gists_url":"https://api.github.com/users/srisankethu/gists{/gist_id}","starred_url":"https://api.github.com/users/srisankethu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srisankethu/subscriptions","organizations_url":"https://api.github.com/users/srisankethu/orgs","repos_url":"https://api.github.com/users/srisankethu/repos","events_url":"https://api.github.com/users/srisankethu/events{/privacy}","received_events_url":"https://api.github.com/users/srisankethu/received_events","type":"User","site_admin":false},"repo":{"id":47873448,"name":"pyramid","full_name":"srisankethu/pyramid","owner":{"login":"srisankethu","id":12644108,"avatar_url":"https://avatars.githubusercontent.com/u/12644108?v=3","gravatar_id":"","url":"https://api.github.com/users/srisankethu","html_url":"https://github.com/srisankethu","followers_url":"https://api.github.com/users/srisankethu/followers","following_url":"https://api.github.com/users/srisankethu/following{/other_user}","gists_url":"https://api.github.com/users/srisankethu/gists{/gist_id}","starred_url":"https://api.github.com/users/srisankethu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srisankethu/subscriptions","organizations_url":"https://api.github.com/users/srisankethu/orgs","repos_url":"https://api.github.com/users/srisankethu/repos","events_url":"https://api.github.com/users/srisankethu/events{/privacy}","received_events_url":"https://api.github.com/users/srisankethu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/srisankethu/pyramid","description":"Pyramid web framework","fork":true,"url":"https://api.github.com/repos/srisankethu/pyramid","forks_url":"https://api.github.com/repos/srisankethu/pyramid/forks","keys_url":"https://api.github.com/repos/srisankethu/pyramid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/srisankethu/pyramid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/srisankethu/pyramid/teams","hooks_url":"https://api.github.com/repos/srisankethu/pyramid/hooks","issue_events_url":"https://api.github.com/repos/srisankethu/pyramid/issues/events{/number}","events_url":"https://api.github.com/repos/srisankethu/pyramid/events","assignees_url":"https://api.github.com/repos/srisankethu/pyramid/assignees{/user}","branches_url":"https://api.github.com/repos/srisankethu/pyramid/branches{/branch}","tags_url":"https://api.github.com/repos/srisankethu/pyramid/tags","blobs_url":"https://api.github.com/repos/srisankethu/pyramid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/srisankethu/pyramid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/srisankethu/pyramid/git/refs{/sha}","trees_url":"https://api.github.com/repos/srisankethu/pyramid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/srisankethu/pyramid/statuses/{sha}","languages_url":"https://api.github.com/repos/srisankethu/pyramid/languages","stargazers_url":"https://api.github.com/repos/srisankethu/pyramid/stargazers","contributors_url":"https://api.github.com/repos/srisankethu/pyramid/contributors","subscribers_url":"https://api.github.com/repos/srisankethu/pyramid/subscribers","subscription_url":"https://api.github.com/repos/srisankethu/pyramid/subscription","commits_url":"https://api.github.com/repos/srisankethu/pyramid/commits{/sha}","git_commits_url":"https://api.github.com/repos/srisankethu/pyramid/git/commits{/sha}","comments_url":"https://api.github.com/repos/srisankethu/pyramid/comments{/number}","issue_comment_url":"https://api.github.com/repos/srisankethu/pyramid/issues/comments{/number}","contents_url":"https://api.github.com/repos/srisankethu/pyramid/contents/{+path}","compare_url":"https://api.github.com/repos/srisankethu/pyramid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/srisankethu/pyramid/merges","archive_url":"https://api.github.com/repos/srisankethu/pyramid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/srisankethu/pyramid/downloads","issues_url":"https://api.github.com/repos/srisankethu/pyramid/issues{/number}","pulls_url":"https://api.github.com/repos/srisankethu/pyramid/pulls{/number}","milestones_url":"https://api.github.com/repos/srisankethu/pyramid/milestones{/number}","notifications_url":"https://api.github.com/repos/srisankethu/pyramid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/srisankethu/pyramid/labels{/name}","releases_url":"https://api.github.com/repos/srisankethu/pyramid/releases{/id}","created_at":"2015-12-12T10:12:50Z","updated_at":"2015-12-12T11:27:51Z","pushed_at":"2015-12-12T12:27:18Z","git_url":"git://github.com/srisankethu/pyramid.git","ssh_url":"git@github.com:srisankethu/pyramid.git","clone_url":"https://github.com/srisankethu/pyramid.git","svn_url":"https://github.com/srisankethu/pyramid","homepage":"http://docs.pylonsproject.org/en/latest/docs/pyramid.html","size":17966,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"Pylons:master","ref":"master","sha":"6f34bf84917f72f464222dfa518d40300f67a365","user":{"login":"Pylons","id":452227,"avatar_url":"https://avatars.githubusercontent.com/u/452227?v=3","gravatar_id":"","url":"https://api.github.com/users/Pylons","html_url":"https://github.com/Pylons","followers_url":"https://api.github.com/users/Pylons/followers","following_url":"https://api.github.com/users/Pylons/following{/other_user}","gists_url":"https://api.github.com/users/Pylons/gists{/gist_id}","starred_url":"https://api.github.com/users/Pylons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pylons/subscriptions","organizations_url":"https://api.github.com/users/Pylons/orgs","repos_url":"https://api.github.com/users/Pylons/repos","events_url":"https://api.github.com/users/Pylons/events{/privacy}","received_events_url":"https://api.github.com/users/Pylons/received_events","type":"Organization","site_admin":false},"repo":{"id":1020639,"name":"pyramid","full_name":"Pylons/pyramid","owner":{"login":"Pylons","id":452227,"avatar_url":"https://avatars.githubusercontent.com/u/452227?v=3","gravatar_id":"","url":"https://api.github.com/users/Pylons","html_url":"https://github.com/Pylons","followers_url":"https://api.github.com/users/Pylons/followers","following_url":"https://api.github.com/users/Pylons/following{/other_user}","gists_url":"https://api.github.com/users/Pylons/gists{/gist_id}","starred_url":"https://api.github.com/users/Pylons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pylons/subscriptions","organizations_url":"https://api.github.com/users/Pylons/orgs","repos_url":"https://api.github.com/users/Pylons/repos","events_url":"https://api.github.com/users/Pylons/events{/privacy}","received_events_url":"https://api.github.com/users/Pylons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Pylons/pyramid","description":"Pyramid web framework","fork":false,"url":"https://api.github.com/repos/Pylons/pyramid","forks_url":"https://api.github.com/repos/Pylons/pyramid/forks","keys_url":"https://api.github.com/repos/Pylons/pyramid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Pylons/pyramid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Pylons/pyramid/teams","hooks_url":"https://api.github.com/repos/Pylons/pyramid/hooks","issue_events_url":"https://api.github.com/repos/Pylons/pyramid/issues/events{/number}","events_url":"https://api.github.com/repos/Pylons/pyramid/events","assignees_url":"https://api.github.com/repos/Pylons/pyramid/assignees{/user}","branches_url":"https://api.github.com/repos/Pylons/pyramid/branches{/branch}","tags_url":"https://api.github.com/repos/Pylons/pyramid/tags","blobs_url":"https://api.github.com/repos/Pylons/pyramid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Pylons/pyramid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Pylons/pyramid/git/refs{/sha}","trees_url":"https://api.github.com/repos/Pylons/pyramid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Pylons/pyramid/statuses/{sha}","languages_url":"https://api.github.com/repos/Pylons/pyramid/languages","stargazers_url":"https://api.github.com/repos/Pylons/pyramid/stargazers","contributors_url":"https://api.github.com/repos/Pylons/pyramid/contributors","subscribers_url":"https://api.github.com/repos/Pylons/pyramid/subscribers","subscription_url":"https://api.github.com/repos/Pylons/pyramid/subscription","commits_url":"https://api.github.com/repos/Pylons/pyramid/commits{/sha}","git_commits_url":"https://api.github.com/repos/Pylons/pyramid/git/commits{/sha}","comments_url":"https://api.github.com/repos/Pylons/pyramid/comments{/number}","issue_comment_url":"https://api.github.com/repos/Pylons/pyramid/issues/comments{/number}","contents_url":"https://api.github.com/repos/Pylons/pyramid/contents/{+path}","compare_url":"https://api.github.com/repos/Pylons/pyramid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Pylons/pyramid/merges","archive_url":"https://api.github.com/repos/Pylons/pyramid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Pylons/pyramid/downloads","issues_url":"https://api.github.com/repos/Pylons/pyramid/issues{/number}","pulls_url":"https://api.github.com/repos/Pylons/pyramid/pulls{/number}","milestones_url":"https://api.github.com/repos/Pylons/pyramid/milestones{/number}","notifications_url":"https://api.github.com/repos/Pylons/pyramid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Pylons/pyramid/labels{/name}","releases_url":"https://api.github.com/repos/Pylons/pyramid/releases{/id}","created_at":"2010-10-24T22:00:35Z","updated_at":"2015-12-12T16:04:13Z","pushed_at":"2015-12-14T10:47:03Z","git_url":"git://github.com/Pylons/pyramid.git","ssh_url":"git@github.com:Pylons/pyramid.git","clone_url":"https://github.com/Pylons/pyramid.git","svn_url":"https://github.com/Pylons/pyramid","homepage":"http://docs.pylonsproject.org/en/latest/docs/pyramid.html","size":19002,"stargazers_count":1844,"watchers_count":1844,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":633,"mirror_url":null,"open_issues_count":132,"forks":633,"open_issues":132,"watchers":1844,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Pylons/pyramid/pulls/2178"},"html":{"href":"https://github.com/Pylons/pyramid/pull/2178"},"issue":{"href":"https://api.github.com/repos/Pylons/pyramid/issues/2178"},"comments":{"href":"https://api.github.com/repos/Pylons/pyramid/issues/2178/comments"},"review_comments":{"href":"https://api.github.com/repos/Pylons/pyramid/pulls/2178/comments"},"review_comment":{"href":"https://api.github.com/repos/Pylons/pyramid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Pylons/pyramid/pulls/2178/commits"},"statuses":{"href":"https://api.github.com/repos/Pylons/pyramid/statuses/b4fcff0471e16b6dab3a685df970bca712c5cb3b"}}}}