Pastebin

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
commit 72be30947d856f68c3c296eab9664292da8fd5ac
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Date:   Thu Oct 3 22:38:33 2013 +0000

    [#6668] avoid ssl redirect for taskd requests, log if it happens

diff --git Allura/allura/command/taskd.py Allura/allura/command/taskd.py
index 87dbfa4..c75824d 100644
--- Allura/allura/command/taskd.py
+++ Allura/allura/command/taskd.py
@@ -38,6 +38,7 @@
 
 status_log = logging.getLogger('taskdstatus')
 
+log = logging.getLogger(__name__)
 
 @contextmanager
 def proctitle(title):
@@ -99,7 +100,9 @@ def worker(self):
             only = only.split(',')
 
         def start_response(status, headers, exc_info=None):
-            pass
+            if status != '200 OK':
+                logging.warn('Unexpected http response from taskd request: %s.  Headers: %s',
+                             status, headers)
 
         def waitfunc_amqp():
             try:
diff --git Allura/allura/config/middleware.py Allura/allura/config/middleware.py
index 989347a..fc02ffb 100644
--- Allura/allura/config/middleware.py
+++ 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