From: Eric Covener Date: Mon, 19 Jan 2015 04:16:28 +0000 (+0000) Subject: revert r1642852 for 2.4.x release purposes. It appears to break X-Git-Tag: 2.4.12~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91c2b830727778055068eacb4f3df016b414c23e;p=thirdparty%2Fapache%2Fhttpd.git revert r1642852 for 2.4.x release purposes. It appears to break too much DirectoryMatch matching and is not critical to have in. Discussion on dev@ on trunk rev commit msg for r1635428 Also, I don't think the addition in the middle of the core_dir_config given that the core_dir_config is exposed to modules as kind of a special case. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1652902 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index 13ff1124e59..6ce4f4690d6 100644 --- a/STATUS +++ b/STATUS @@ -105,6 +105,10 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] + * core: Do not match files when using DirectoryMatch. PR 41867. + trunk patch: http://svn.apache.org/r1635428 + 2.4.x patch: http://people.apache.org/~jkaluza/patches/httpd-2.4.x-directorymatch.patch + +1: jkaluza, covener, ylavic PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/include/http_core.h b/include/http_core.h index 4a39d96c495..5cef6224fc6 100644 --- a/include/http_core.h +++ b/include/http_core.h @@ -597,7 +597,6 @@ typedef struct { #define AP_CONDITION_ELSE 2 #define AP_CONDITION_ELSEIF (AP_CONDITION_ELSE|AP_CONDITION_IF) unsigned int condition_ifelse : 2; /* is this an , , or */ - unsigned int d_is_directory : 1; /* Whether core_dir_config is Directory* */ ap_expr_info_t *condition; /* Conditionally merge sections */ diff --git a/server/core.c b/server/core.c index 22bb2b14cb6..e307e92bb24 100644 --- a/server/core.c +++ b/server/core.c @@ -2164,7 +2164,6 @@ static const char *dirsection(cmd_parms *cmd, void *mconfig, const char *arg) conf->r = r; conf->d = cmd->path; conf->d_is_fnmatch = (apr_fnmatch_test(conf->d) != 0); - conf->d_is_directory = 1; if (r) { conf->refs = apr_array_make(cmd->pool, 8, sizeof(char *)); diff --git a/server/request.c b/server/request.c index 8d660e2817e..af0a697a9f4 100644 --- a/server/request.c +++ b/server/request.c @@ -1212,13 +1212,6 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r) pmatch = apr_palloc(rxpool, nmatch*sizeof(ap_regmatch_t)); } - /* core_dir_config is Directory*, but the requested file is - * not a directory, so although the regexp could match, - * we skip it. */ - if (entry_core->d_is_directory && r->finfo.filetype != APR_DIR) { - continue; - } - if (ap_regexec(entry_core->r, r->filename, nmatch, pmatch, 0)) { continue; }