incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [13/13] git commit: put middleware back in proper place so error pages work correctly (bug introduced in 9a1363)
Date Wed, 28 Aug 2013 19:30:57 GMT
put middleware back in proper place so error pages work correctly (bug introduced in 9a1363)


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/6769dc23
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/6769dc23
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/6769dc23

Branch: refs/heads/master
Commit: 6769dc236d4002e9da51c3cb99439c233fb8a8b2
Parents: 1581f29
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Wed Aug 28 19:02:12 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Aug 28 19:05:47 2013 +0000

----------------------------------------------------------------------
 Allura/allura/config/middleware.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6769dc23/Allura/allura/config/middleware.py
----------------------------------------------------------------------
diff --git a/Allura/allura/config/middleware.py b/Allura/allura/config/middleware.py
index 1e9b0c7..7395f93 100644
--- a/Allura/allura/config/middleware.py
+++ b/Allura/allura/config/middleware.py
@@ -161,15 +161,17 @@ def _make_core_app(root, global_conf, full_stack=True, **app_conf):
     #    streaming=true ensures they won't be cleaned up till
     #    the WSGI application's iterator is exhausted
     app = RegistryManager(app, streaming=True)
-    # Make sure that the wsgi.scheme is set appropriately when we
-    # have the funky HTTP_X_SFINC_SSL  environ var
-    if asbool(app_conf.get('auth.method', 'local')=='sfx'):
-        app = set_scheme_middleware(app)
     # "task" wsgi would get a 2nd request to /error/document if we used this middleware
     if config.get('override_root') != 'task':
         # Converts exceptions to HTTP errors, shows traceback in debug mode
         tg.error.footer_html = '<!-- %s %s -->'  # don't use TG footer with extra CSS
& images that take time to load
         app = tg.error.ErrorHandler(app, global_conf, **config['pylons.errorware'])
+
+        # Make sure that the wsgi.scheme is set appropriately when we
+        # have the funky HTTP_X_SFINC_SSL  environ var
+        if asbool(app_conf.get('auth.method', 'local')=='sfx'):
+            app = set_scheme_middleware(app)
+        
         # Redirect some status codes to /error/document
         if asbool(config['debug']):
             app = StatusCodeRedirect(app, base_config.handle_status_codes)


Mime
View raw message