From: Brian Pane Date: Sat, 24 Nov 2001 10:52:27 +0000 (+0000) Subject: short-circuit out of xbithack_handler immediately if xbithack X-Git-Tag: 2.0.29~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13f7e7c25084e6fb152c5a8252dca5f94348b4ee;p=apache short-circuit out of xbithack_handler immediately if xbithack 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 --- diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 0037f7686c..0b0059df87 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -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. */