Import MigrationManager from mongo in mongo backend.
[mediagoblin.git] / mediagoblin / app.py
index 04eb2acc8fa2de3efb1f0c85adea3f02710aa1dd..96b2c8abd9c516622b6ad364e94422597fd2c9c6 100644 (file)
@@ -122,6 +122,11 @@ class MediaGoblinApp(object):
         # The other option would be:
         # request.full_path = environ["SCRIPT_URL"]
 
+        # Fix up environ for urlgen
+        # See bug: https://bitbucket.org/bbangert/routes/issue/55/cache_hostinfo-breaks-on-https-off
+        if environ.get('HTTPS', '').lower() == 'off':
+            environ.pop('HTTPS')
+
         ## Attach utilities to the request object
         request.matchdict = route_match
         request.urlgen = routes.URLGenerator(self.routing, environ)