ASF Bugzilla – Attachment 32163 Details for
Bug 41867
<DirectoryMatch> Matches Files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
another approach v2
httpd-trunk-directorymatch-no-files-match.patch (text/plain), 1.47 KB, created by
jkaluza
on 2014-10-29 11:08:54 UTC
(
hide
)
Description:
another approach v2
Filename:
MIME Type:
Creator:
jkaluza
Created:
2014-10-29 11:08:54 UTC
Size:
1.47 KB
patch
obsolete
>Index: include/http_core.h >=================================================================== >--- include/http_core.h (revision 1633083) >+++ include/http_core.h (working copy) >@@ -619,6 +619,7 @@ > > 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; >Index: server/core.c >=================================================================== >--- server/core.c (revision 1633083) >+++ server/core.c (working copy) >@@ -2224,6 +2224,7 @@ > 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 *)); >Index: server/request.c >=================================================================== >--- server/request.c (revision 1633083) >+++ server/request.c (working copy) >@@ -1216,6 +1216,13 @@ > 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; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 41867
:
22401
|
32161
| 32163