incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [02/50] git commit: [#6668] avoid ssl redirect for taskd requests, log if it happens
Date Fri, 04 Oct 2013 18:06:46 GMT
[#6668] avoid ssl redirect for taskd requests, log if it happens


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

Branch: refs/heads/cj/6692
Commit: 248ddcb8339fcca11ba84a747b9c5410a97c465b
Parents: 0487072
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Thu Oct 3 22:38:33 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Fri Oct 4 13:23:56 2013 +0000

----------------------------------------------------------------------
 Allura/allura/command/taskd.py     | 5 ++++-
 Allura/allura/config/middleware.py | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/248ddcb8/Allura/allura/command/taskd.py
----------------------------------------------------------------------
diff --git a/Allura/allura/command/taskd.py b/Allura/allura/command/taskd.py
index 87dbfa4..94c6221 100644
--- a/Allura/allura/command/taskd.py
+++ b/Allura/allura/command/taskd.py
@@ -38,6 +38,7 @@ faulthandler.enable()
 
 status_log = logging.getLogger('taskdstatus')
 
+log = logging.getLogger(__name__)
 
 @contextmanager
 def proctitle(title):
@@ -99,7 +100,9 @@ class TaskdCommand(base.Command):
             only = only.split(',')
 
         def start_response(status, headers, exc_info=None):
-            pass
+            if status != '200 OK':
+                log.warn('Unexpected http response from taskd request: %s.  Headers: %s',
+                             status, headers)
 
         def waitfunc_amqp():
             try:

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/248ddcb8/Allura/allura/config/middleware.py
----------------------------------------------------------------------
diff --git a/Allura/allura/config/middleware.py b/Allura/allura/config/middleware.py
index 989347a..fc02ffb 100644
--- a/Allura/allura/config/middleware.py
+++ b/Allura/allura/config/middleware.py
@@ -143,7 +143,8 @@ def _make_core_app(root, global_conf, full_stack=True, **app_conf):
     # Setup the allura SOPs
     app = allura_globals_middleware(app)
     # Ensure https for logged in users, http for anonymous ones
-    if asbool(app_conf.get('auth.method', 'local')=='sfx'):
+    if (asbool(app_conf.get('auth.method', 'local') == 'sfx')
+            and config.get('override_root') != 'task'):
         app = SSLMiddleware(app, app_conf.get('no_redirect.pattern'),
                 app_conf.get('force_ssl.pattern'))
     # Setup resource manager, widget context SOP


Mime
View raw message