]> granicus.if.org Git - apache/commitdiff
fix order of lowercase/compare for r->handler
authorEric Covener <covener@apache.org>
Sat, 19 Mar 2016 16:48:19 +0000 (16:48 +0000)
committerEric Covener <covener@apache.org>
Sat, 19 Mar 2016 16:48:19 +0000 (16:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1735786 13f79535-47bb-0310-9956-ffa450edef68

server/core.c

index db003169ba0d5d4c52578f7197ba536d51e19286..ddc7a2707d9c6935897009a3f068ee72ef956997 100644 (file)
@@ -4773,16 +4773,16 @@ static int core_override_type(request_rec *r)
                           "Can't evaluate handler expression: %s", err);
             return HTTP_INTERNAL_SERVER_ERROR;
         }
+
+        if (val != ap_strstr_c(val, "proxy:unix")) { 
+            /* Retained for compatibility --  but not for UDS */
+            char *tmp = apr_pstrdup(r->pool, val);
+            ap_str_tolower(tmp);
+            val = tmp;
+        }
+
         if (strcmp(val, "none")) { 
-            if (val != ap_strstr_c(val, "proxy:unix")) { 
-                /* Retained for compatibility --  but not for UDS */
-                char *tmp = apr_pstrdup(r->pool, val);
-                ap_str_tolower(tmp);
-                r->handler = tmp;
-            }
-            else { 
-                r->handler = val;
-            }
+            r->handler = val;
         }
     }
     else if (conf->handler && strcmp(conf->handler, "none")) {