From 3be7c84bdeec14893315252b2faaf786d5cb5fcc Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Tue, 14 Jan 2003 03:01:52 +0000 Subject: [PATCH] Once again, allow or other wildcard patterns in Directory blocks. Note a similar problem with Includes *.conf git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98260 13f79535-47bb-0310-9956-ffa450edef68 --- server/config.c | 3 +++ server/core.c | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/server/config.c b/server/config.c index c25e8f9282..b50adbd606 100644 --- a/server/config.c +++ b/server/config.c @@ -1445,6 +1445,9 @@ AP_DECLARE(void) ap_process_resource_config(server_rec *s, const char *fname, ap_configfile_t *cfp; int ispatt; + /* XXX: lstat() won't work on the wildcard pattern... + */ + /* don't require conf/httpd.conf if we have a -C or -c switch */ if ((ap_server_pre_read_config->nelts || ap_server_post_read_config->nelts) diff --git a/server/core.c b/server/core.c index 18e8e04b30..6c1743318e 100644 --- a/server/core.c +++ b/server/core.c @@ -1635,8 +1635,9 @@ static const char *dirsection(cmd_parms *cmd, void *mconfig, const char *arg) /* * Ensure that the pathname is canonical, and append the trailing / */ - if (apr_filepath_merge(&newpath, NULL, cmd->path, - APR_FILEPATH_TRUENAME, cmd->pool) != APR_SUCCESS) { + apr_status_t rv = apr_filepath_merge(&newpath, NULL, cmd->path, + APR_FILEPATH_TRUENAME, cmd->pool); + if (rv != APR_SUCCESS && rv != APR_EPATHWILD) { return apr_pstrcat(cmd->pool, "path, "\"> path is invalid.", NULL); } @@ -2191,6 +2192,9 @@ static const char *include_config (cmd_parms *cmd, void *dummy, { ap_directive_t *conftree = NULL; const char* conffile = ap_server_root_relative(cmd->pool, name); + + /* XXX: ap_server_root_relative won't work on the wildcard pattern... + */ if (!conffile) { return apr_pstrcat(cmd->pool, "Invalid Include path ", -- 2.40.0