httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r1653666 - in /httpd/httpd/trunk: include/http_core.h server/core.c server/request.c
Date Wed, 21 Jan 2015 21:39:55 GMT
Author: wrowe
Date: Wed Jan 21 21:39:55 2015
New Revision: 1653666

URL: http://svn.apache.org/r1653666
Log:
Revert r4635428 corresponding to PR41867.

The code reverted attempted to restrict comparisons of the r->filename
to given DirectoryMatch blocks.

r->filename was already a non-directory entity at this point, because we
have already fallen out of the } while (thisinfo.filetype == APR_DIR);
block above.

The addition of r->d_is_directory was redundant.  That is what is always
returned by ap_get_core_module_config(r->per_dir_config).

Note modifying dir_config required an MMN major bump as this commit could
have realigned the offset of refs (had it been added to the end, this
would correspond to an mmn minor bump) and other fields packed into the
same bytes (this is undefined). Bump on revert to prevent unexpected crashes.



Modified:
    httpd/httpd/trunk/include/http_core.h
    httpd/httpd/trunk/server/core.c
    httpd/httpd/trunk/server/request.c

Modified: httpd/httpd/trunk/include/http_core.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/http_core.h?rev=1653666&r1=1653665&r2=1653666&view=diff
==============================================================================
--- httpd/httpd/trunk/include/http_core.h (original)
+++ httpd/httpd/trunk/include/http_core.h Wed Jan 21 21:39:55 2015
@@ -619,7 +619,6 @@ typedef struct {
 
     unsigned int allow_encoded_slashes_set : 1;
     unsigned int decode_encoded_slashes_set : 1;
-    unsigned int d_is_directory : 1;
 
     /** Named back references */
     apr_array_header_t *refs;

Modified: httpd/httpd/trunk/server/core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=1653666&r1=1653665&r2=1653666&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core.c (original)
+++ httpd/httpd/trunk/server/core.c Wed Jan 21 21:39:55 2015
@@ -2238,7 +2238,6 @@ static const char *dirsection(cmd_parms
     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 *));

Modified: httpd/httpd/trunk/server/request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/request.c?rev=1653666&r1=1653665&r2=1653666&view=diff
==============================================================================
--- httpd/httpd/trunk/server/request.c (original)
+++ httpd/httpd/trunk/server/request.c Wed Jan 21 21:39:55 2015
@@ -1216,13 +1216,6 @@ AP_DECLARE(int) ap_directory_walk(reques
                 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;
             }



Mime
View raw message