diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-10-15 11:07:13 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-10-15 11:07:13 -0500 |
commit | f693f9af88215b40ae7c7e2adb4f39fb7fd3b096 (patch) | |
tree | 07cd44a4ce495d0bc2b64f2c8f087448b1372736 /mediagoblin/app.py | |
parent | 76c94f6edfe8050f56242dd758f8830f24d1b339 (diff) | |
parent | 05788ef450cd63da4009cea1825323e10e572e43 (diff) | |
download | mediagoblin-f693f9af88215b40ae7c7e2adb4f39fb7fd3b096.tar.lz mediagoblin-f693f9af88215b40ae7c7e2adb4f39fb7fd3b096.tar.xz mediagoblin-f693f9af88215b40ae7c7e2adb4f39fb7fd3b096.zip |
Merge remote branch 'remotes/elrond/misc/i592_use_full_path'
Diffstat (limited to 'mediagoblin/app.py')
-rw-r--r-- | mediagoblin/app.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mediagoblin/app.py b/mediagoblin/app.py index a72b9306..ee646282 100644 --- a/mediagoblin/app.py +++ b/mediagoblin/app.py @@ -118,6 +118,17 @@ class MediaGoblinApp(object): path_info = request.path_info route_match = self.routing.match(path_info) + # By using fcgi, mediagoblin can run under a base path + # like /mediagoblin/. request.path_info contains the + # path inside mediagoblin. If the something needs the + # full path of the current page, that should include + # the basepath. + # Note: urlgen and routes are fine! + request.full_path = environ["SCRIPT_NAME"] + request.path_info + # python-routes uses SCRIPT_NAME. So let's use that too. + # The other option would be: + # request.full_path = environ["SCRIPT_URL"] + ## Attach utilities to the request object request.matchdict = route_match request.urlgen = routes.URLGenerator(self.routing, environ) |