{"action":"created","comment":{"url":"https://api.github.com/repos/AppScale/appscale/pulls/comments/35469923","id":35469923,"diff_hunk":"@@ -159,3 +159,16 @@ def get_instance(self, request_id):\n     \"\"\"\n     with self._lock:\n       return self._request_id_to_instance.get(request_id, None)\n+\n+  def get_scheme(self, request_id):\n+    \"\"\"Returns the scheme for this request.\n+\n+    Args:\n+      request_id: The string id of the request making the API call.\n+\n+    Returns:\n+      One of 'http', 'https'.\n+    \"\"\"\n+    with self._lock:\n+      environ = self._request_wsgi_environ[request_id]\n+      return environ['HTTP_X_FORWARDED_PROTO']","path":"AppServer/google/appengine/tools/devappserver2/wsgi_request_info.py","position":16,"original_position":16,"commit_id":"b36a88307262a6282f9feaa4cb530349f3cd408e","original_commit_id":"b36a88307262a6282f9feaa4cb530349f3cd408e","user":{"login":"cdonati","id":1923367,"avatar_url":"https://avatars.githubusercontent.com/u/1923367?v=3","gravatar_id":"","url":"https://api.github.com/users/cdonati","html_url":"https://github.com/cdonati","followers_url":"https://api.github.com/users/cdonati/followers","following_url":"https://api.github.com/users/cdonati/following{/other_user}","gists_url":"https://api.github.com/users/cdonati/gists{/gist_id}","starred_url":"https://api.github.com/users/cdonati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdonati/subscriptions","organizations_url":"https://api.github.com/users/cdonati/orgs","repos_url":"https://api.github.com/users/cdonati/repos","events_url":"https://api.github.com/users/cdonati/events{/privacy}","received_events_url":"https://api.github.com/users/cdonati/received_events","type":"User","site_admin":false},"body":"I would suggest setting it to http (or https) and overriding it if the header indicates otherwise. If for some reason a request comes in without that header, we still want to return one of the two values.","created_at":"2015-07-24T21:59:39Z","updated_at":"2015-07-24T21:59:39Z","html_url":"https://github.com/AppScale/appscale/pull/1767#discussion_r35469923","pull_request_url":"https://api.github.com/repos/AppScale/appscale/pulls/1767","_links":{"self":{"href":"https://api.github.com/repos/AppScale/appscale/pulls/comments/35469923"},"html":{"href":"https://github.com/AppScale/appscale/pull/1767#discussion_r35469923"},"pull_request":{"href":"https://api.github.com/repos/AppScale/appscale/pulls/1767"}}},"pull_request":{"url":"https://api.github.com/repos/AppScale/appscale/pulls/1767","id":40818807,"html_url":"https://github.com/AppScale/appscale/pull/1767","diff_url":"https://github.com/AppScale/appscale/pull/1767.diff","patch_url":"https://github.com/AppScale/appscale/pull/1767.patch","issue_url":"https://api.github.com/repos/AppScale/appscale/issues/1767","number":1767,"state":"open","locked":false,"title":"Fixing bug in blobstore uploads via HTTPS.","user":{"login":"menivaitsi","id":6760257,"avatar_url":"https://avatars.githubusercontent.com/u/6760257?v=3","gravatar_id":"","url":"https://api.github.com/users/menivaitsi","html_url":"https://github.com/menivaitsi","followers_url":"https://api.github.com/users/menivaitsi/followers","following_url":"https://api.github.com/users/menivaitsi/following{/other_user}","gists_url":"https://api.github.com/users/menivaitsi/gists{/gist_id}","starred_url":"https://api.github.com/users/menivaitsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/menivaitsi/subscriptions","organizations_url":"https://api.github.com/users/menivaitsi/orgs","repos_url":"https://api.github.com/users/menivaitsi/repos","events_url":"https://api.github.com/users/menivaitsi/events{/privacy}","received_events_url":"https://api.github.com/users/menivaitsi/received_events","type":"User","site_admin":false},"body":"Do not merge yet.","created_at":"2015-07-24T21:43:47Z","updated_at":"2015-07-24T21:59:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd30d772f1ad473f118fbbd021bc8bc37f222f18","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AppScale/appscale/pulls/1767/commits","review_comments_url":"https://api.github.com/repos/AppScale/appscale/pulls/1767/comments","review_comment_url":"https://api.github.com/repos/AppScale/appscale/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AppScale/appscale/issues/1767/comments","statuses_url":"https://api.github.com/repos/AppScale/appscale/statuses/b36a88307262a6282f9feaa4cb530349f3cd408e","head":{"label":"menivaitsi:blobstore-protocol","ref":"blobstore-protocol","sha":"b36a88307262a6282f9feaa4cb530349f3cd408e","user":{"login":"menivaitsi","id":6760257,"avatar_url":"https://avatars.githubusercontent.com/u/6760257?v=3","gravatar_id":"","url":"https://api.github.com/users/menivaitsi","html_url":"https://github.com/menivaitsi","followers_url":"https://api.github.com/users/menivaitsi/followers","following_url":"https://api.github.com/users/menivaitsi/following{/other_user}","gists_url":"https://api.github.com/users/menivaitsi/gists{/gist_id}","starred_url":"https://api.github.com/users/menivaitsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/menivaitsi/subscriptions","organizations_url":"https://api.github.com/users/menivaitsi/orgs","repos_url":"https://api.github.com/users/menivaitsi/repos","events_url":"https://api.github.com/users/menivaitsi/events{/privacy}","received_events_url":"https://api.github.com/users/menivaitsi/received_events","type":"User","site_admin":false},"repo":{"id":17155192,"name":"appscale","full_name":"menivaitsi/appscale","owner":{"login":"menivaitsi","id":6760257,"avatar_url":"https://avatars.githubusercontent.com/u/6760257?v=3","gravatar_id":"","url":"https://api.github.com/users/menivaitsi","html_url":"https://github.com/menivaitsi","followers_url":"https://api.github.com/users/menivaitsi/followers","following_url":"https://api.github.com/users/menivaitsi/following{/other_user}","gists_url":"https://api.github.com/users/menivaitsi/gists{/gist_id}","starred_url":"https://api.github.com/users/menivaitsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/menivaitsi/subscriptions","organizations_url":"https://api.github.com/users/menivaitsi/orgs","repos_url":"https://api.github.com/users/menivaitsi/repos","events_url":"https://api.github.com/users/menivaitsi/events{/privacy}","received_events_url":"https://api.github.com/users/menivaitsi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/menivaitsi/appscale","description":"The Open Source Implementation of Google App Engine -- Take your apps everywhere.","fork":true,"url":"https://api.github.com/repos/menivaitsi/appscale","forks_url":"https://api.github.com/repos/menivaitsi/appscale/forks","keys_url":"https://api.github.com/repos/menivaitsi/appscale/keys{/key_id}","collaborators_url":"https://api.github.com/repos/menivaitsi/appscale/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/menivaitsi/appscale/teams","hooks_url":"https://api.github.com/repos/menivaitsi/appscale/hooks","issue_events_url":"https://api.github.com/repos/menivaitsi/appscale/issues/events{/number}","events_url":"https://api.github.com/repos/menivaitsi/appscale/events","assignees_url":"https://api.github.com/repos/menivaitsi/appscale/assignees{/user}","branches_url":"https://api.github.com/repos/menivaitsi/appscale/branches{/branch}","tags_url":"https://api.github.com/repos/menivaitsi/appscale/tags","blobs_url":"https://api.github.com/repos/menivaitsi/appscale/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/menivaitsi/appscale/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/menivaitsi/appscale/git/refs{/sha}","trees_url":"https://api.github.com/repos/menivaitsi/appscale/git/trees{/sha}","statuses_url":"https://api.github.com/repos/menivaitsi/appscale/statuses/{sha}","languages_url":"https://api.github.com/repos/menivaitsi/appscale/languages","stargazers_url":"https://api.github.com/repos/menivaitsi/appscale/stargazers","contributors_url":"https://api.github.com/repos/menivaitsi/appscale/contributors","subscribers_url":"https://api.github.com/repos/menivaitsi/appscale/subscribers","subscription_url":"https://api.github.com/repos/menivaitsi/appscale/subscription","commits_url":"https://api.github.com/repos/menivaitsi/appscale/commits{/sha}","git_commits_url":"https://api.github.com/repos/menivaitsi/appscale/git/commits{/sha}","comments_url":"https://api.github.com/repos/menivaitsi/appscale/comments{/number}","issue_comment_url":"https://api.github.com/repos/menivaitsi/appscale/issues/comments{/number}","contents_url":"https://api.github.com/repos/menivaitsi/appscale/contents/{+path}","compare_url":"https://api.github.com/repos/menivaitsi/appscale/compare/{base}...{head}","merges_url":"https://api.github.com/repos/menivaitsi/appscale/merges","archive_url":"https://api.github.com/repos/menivaitsi/appscale/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/menivaitsi/appscale/downloads","issues_url":"https://api.github.com/repos/menivaitsi/appscale/issues{/number}","pulls_url":"https://api.github.com/repos/menivaitsi/appscale/pulls{/number}","milestones_url":"https://api.github.com/repos/menivaitsi/appscale/milestones{/number}","notifications_url":"https://api.github.com/repos/menivaitsi/appscale/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/menivaitsi/appscale/labels{/name}","releases_url":"https://api.github.com/repos/menivaitsi/appscale/releases{/id}","created_at":"2014-02-24T23:55:49Z","updated_at":"2014-11-20T17:56:24Z","pushed_at":"2015-07-24T20:27:38Z","git_url":"git://github.com/menivaitsi/appscale.git","ssh_url":"git@github.com:menivaitsi/appscale.git","clone_url":"https://github.com/menivaitsi/appscale.git","svn_url":"https://github.com/menivaitsi/appscale","homepage":"http://www.appscale.com","size":89662,"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":"AppScale:master","ref":"master","sha":"7246301dda706997b5c561bde88c0acff7ce02d3","user":{"login":"AppScale","id":1486044,"avatar_url":"https://avatars.githubusercontent.com/u/1486044?v=3","gravatar_id":"","url":"https://api.github.com/users/AppScale","html_url":"https://github.com/AppScale","followers_url":"https://api.github.com/users/AppScale/followers","following_url":"https://api.github.com/users/AppScale/following{/other_user}","gists_url":"https://api.github.com/users/AppScale/gists{/gist_id}","starred_url":"https://api.github.com/users/AppScale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppScale/subscriptions","organizations_url":"https://api.github.com/users/AppScale/orgs","repos_url":"https://api.github.com/users/AppScale/repos","events_url":"https://api.github.com/users/AppScale/events{/privacy}","received_events_url":"https://api.github.com/users/AppScale/received_events","type":"Organization","site_admin":false},"repo":{"id":3803067,"name":"appscale","full_name":"AppScale/appscale","owner":{"login":"AppScale","id":1486044,"avatar_url":"https://avatars.githubusercontent.com/u/1486044?v=3","gravatar_id":"","url":"https://api.github.com/users/AppScale","html_url":"https://github.com/AppScale","followers_url":"https://api.github.com/users/AppScale/followers","following_url":"https://api.github.com/users/AppScale/following{/other_user}","gists_url":"https://api.github.com/users/AppScale/gists{/gist_id}","starred_url":"https://api.github.com/users/AppScale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AppScale/subscriptions","organizations_url":"https://api.github.com/users/AppScale/orgs","repos_url":"https://api.github.com/users/AppScale/repos","events_url":"https://api.github.com/users/AppScale/events{/privacy}","received_events_url":"https://api.github.com/users/AppScale/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AppScale/appscale","description":"The Open Source Implementation of Google App Engine -- Take your apps everywhere.","fork":false,"url":"https://api.github.com/repos/AppScale/appscale","forks_url":"https://api.github.com/repos/AppScale/appscale/forks","keys_url":"https://api.github.com/repos/AppScale/appscale/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AppScale/appscale/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AppScale/appscale/teams","hooks_url":"https://api.github.com/repos/AppScale/appscale/hooks","issue_events_url":"https://api.github.com/repos/AppScale/appscale/issues/events{/number}","events_url":"https://api.github.com/repos/AppScale/appscale/events","assignees_url":"https://api.github.com/repos/AppScale/appscale/assignees{/user}","branches_url":"https://api.github.com/repos/AppScale/appscale/branches{/branch}","tags_url":"https://api.github.com/repos/AppScale/appscale/tags","blobs_url":"https://api.github.com/repos/AppScale/appscale/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AppScale/appscale/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AppScale/appscale/git/refs{/sha}","trees_url":"https://api.github.com/repos/AppScale/appscale/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AppScale/appscale/statuses/{sha}","languages_url":"https://api.github.com/repos/AppScale/appscale/languages","stargazers_url":"https://api.github.com/repos/AppScale/appscale/stargazers","contributors_url":"https://api.github.com/repos/AppScale/appscale/contributors","subscribers_url":"https://api.github.com/repos/AppScale/appscale/subscribers","subscription_url":"https://api.github.com/repos/AppScale/appscale/subscription","commits_url":"https://api.github.com/repos/AppScale/appscale/commits{/sha}","git_commits_url":"https://api.github.com/repos/AppScale/appscale/git/commits{/sha}","comments_url":"https://api.github.com/repos/AppScale/appscale/comments{/number}","issue_comment_url":"https://api.github.com/repos/AppScale/appscale/issues/comments{/number}","contents_url":"https://api.github.com/repos/AppScale/appscale/contents/{+path}","compare_url":"https://api.github.com/repos/AppScale/appscale/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AppScale/appscale/merges","archive_url":"https://api.github.com/repos/AppScale/appscale/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AppScale/appscale/downloads","issues_url":"https://api.github.com/repos/AppScale/appscale/issues{/number}","pulls_url":"https://api.github.com/repos/AppScale/appscale/pulls{/number}","milestones_url":"https://api.github.com/repos/AppScale/appscale/milestones{/number}","notifications_url":"https://api.github.com/repos/AppScale/appscale/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AppScale/appscale/labels{/name}","releases_url":"https://api.github.com/repos/AppScale/appscale/releases{/id}","created_at":"2012-03-22T22:35:50Z","updated_at":"2015-07-21T12:31:16Z","pushed_at":"2015-07-24T21:43:48Z","git_url":"git://github.com/AppScale/appscale.git","ssh_url":"git@github.com:AppScale/appscale.git","clone_url":"https://github.com/AppScale/appscale.git","svn_url":"https://github.com/AppScale/appscale","homepage":"http://www.appscale.com","size":186861,"stargazers_count":2014,"watchers_count":2014,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":217,"mirror_url":null,"open_issues_count":34,"forks":217,"open_issues":34,"watchers":2014,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AppScale/appscale/pulls/1767"},"html":{"href":"https://github.com/AppScale/appscale/pull/1767"},"issue":{"href":"https://api.github.com/repos/AppScale/appscale/issues/1767"},"comments":{"href":"https://api.github.com/repos/AppScale/appscale/issues/1767/comments"},"review_comments":{"href":"https://api.github.com/repos/AppScale/appscale/pulls/1767/comments"},"review_comment":{"href":"https://api.github.com/repos/AppScale/appscale/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AppScale/appscale/pulls/1767/commits"},"statuses":{"href":"https://api.github.com/repos/AppScale/appscale/statuses/b36a88307262a6282f9feaa4cb530349f3cd408e"}}}}