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

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: 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 | « no previous file | 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..2c9595c62565af9b88758795649b702f286722e2 100755
--- a/chrome/common/extensions/docs/server/main.py
+++ b/chrome/common/extensions/docs/server/main.py
@@ -172,7 +172,11 @@ 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'))):
+ # switch to https if necessary
+ if (self.request.url.startswith('https'):
+ CHROME_DOMAIN_URL.replace('http', 'https', 1)
Aaron Boodman 2012/08/15 00:15:29 You need to store the result in a variable. Someth
self.path.pop(0) # 'chrome'
for channel in ['dev', 'beta', 'stable', 'trunk']:
if channel in self.path:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698