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

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

Issue 5188003: Resolve relative paths to a hypothetical root before fetching docs from source control. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/common/extensions/docs/server
Patch Set: Created 10 years, 1 month 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/chromeextensionsdocs.py
diff --git a/chrome/common/extensions/docs/server/chromeextensionsdocs.py b/chrome/common/extensions/docs/server/chromeextensionsdocs.py
index 18bd882d30f15f09224df053b4f82dac38c703bc..91dd23a1518dd6e5bc6c14fb418ed9a1208597f6 100644
--- a/chrome/common/extensions/docs/server/chromeextensionsdocs.py
+++ b/chrome/common/extensions/docs/server/chromeextensionsdocs.py
@@ -6,6 +6,7 @@
import cgi
import logging
import re
+import os
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
@@ -43,10 +44,10 @@ DEFAULT_CACHE_TIME = 300
class MainPage(webapp.RequestHandler):
# get page from memcache, or else fetch it from src
def get(self):
- path = self.request.path
+ path = os.path.realpath(os.path.join('/', self.request.path))
# special path to invoke the unit tests
# TODO(nickbaum): is there a less ghetto way to invoke the unit test?
- if path == "/test/":
+ if path == "/test":
self.unitTest()
return
# if root, redirect to index.html
« 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