[#6668] avoid ssl redirect for taskd requests, log if it happens
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 @@
 
 status_log = logging.getLogger('taskdstatus')
 
+log = logging.getLogger(__name__)
 
 @contextmanager
 def proctitle(title):
@@ -99,7 +100,9 @@
             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:
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 @@
     # 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