Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5863)

Unified Diff: chrome/common/extensions/docs/server/main.py

Issue 10823335: fixing https redirect from old codesite url (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased with master Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/docs/server/app.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/server/main.py
diff --git a/chrome/common/extensions/docs/server/main.py b/chrome/common/extensions/docs/server/main.py
index 382ada49665eabdbbd8b61620272db3a41ad21e1..f9f56d0fb99193a2ea4c2fd6e8007c40b5955e8a 100755
--- a/chrome/common/extensions/docs/server/main.py
+++ b/chrome/common/extensions/docs/server/main.py
@@ -172,14 +172,19 @@ class MainPage(webapp.RequestHandler):
def redirectDomain(self):
- if (self.request.url.startswith('http://code.google.com')):
+ if (self.request.url.startswith(('http://code.google.com',
+ 'https://code.google.com'))):
+ newUrl = CHROME_DOMAIN_URL
+ # switch to https if necessary
+ if (self.request.url.startswith('https')):
+ newUrl = newUrl.replace('http', 'https', 1)
self.path.pop(0) # 'chrome'
for channel in ['dev', 'beta', 'stable', 'trunk']:
if channel in self.path:
position = self.path.index(channel)
self.path.pop(position)
self.path.insert(0, channel)
- self.redirect(CHROME_DOMAIN_URL + '/' + '/'.join(self.path), True)
+ self.redirect(newUrl + '/' + '/'.join(self.path), True)
return False
else:
return True
« no previous file with comments | « chrome/common/extensions/docs/server/app.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698