From 13f7e7c25084e6fb152c5a8252dca5f94348b4ee Mon Sep 17 00:00:00 2001 From: Brian Pane Date: Sat, 24 Nov 2001 10:52:27 +0000 Subject: [PATCH] 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 --- modules/filters/mod_include.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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. */ -- 2.50.1