]> granicus.if.org Git - apache/commitdiff
short-circuit out of xbithack_handler immediately if xbithack
authorBrian Pane <brianp@apache.org>
Sat, 24 Nov 2001 10:52:27 +0000 (10:52 +0000)
committerBrian Pane <brianp@apache.org>
Sat, 24 Nov 2001 10:52:27 +0000 (10:52 +0000)
isn't enabled, and use strcmp instead of ap_strcmp_match for
comparing against a non-wildcard pattern

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92163 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_include.c

index 0037f7686c39b86ac83eac6c2ad7782e96ed26dd..0b0059df875364f1a0ab70dfd91e3359ff6c5789 100644 (file)
@@ -3184,19 +3184,20 @@ static int xbithack_handler(request_rec *r)
 #else
     include_dir_config *conf;
  
-    if (ap_strcmp_match(r->handler, "text/html")) {
-        return DECLINED;
-    }
-    if (!(r->finfo.protection & APR_UEXECUTE)) {
-        return DECLINED;
-    }
     conf = (include_dir_config *) ap_get_module_config(r->per_dir_config,
                                                 &include_module);
  
     if (*conf->xbithack == xbithack_off) {
         return DECLINED;
     }
+
+    if (strcmp(r->handler, "text/html")) {
+        return DECLINED;
+    }
+    if (!(r->finfo.protection & APR_UEXECUTE)) {
+        return DECLINED;
+    }
     /* We always return declined, because the default handler will actually
      * serve the file.  All we have to do is add the filter.
      */