summaryrefslogtreecommitdiff
path: root/server/config.c
diff options
context:
space:
mode:
authorEric Covener <covener@apache.org>2015-01-30 16:58:20 +0000
committerEric Covener <covener@apache.org>2015-01-30 16:58:20 +0000
commit2154a9de68745582f49281f28c60e256fb6bf16c (patch)
treeb371da7a8b9eba6767b845fac3ffd6c84b879dc1 /server/config.c
parent2c3fe611bc2b4d20c3e3d2e24e325791d3299b59 (diff)
downloadhttpd-2154a9de68745582f49281f28c60e256fb6bf16c.tar.gz
Provide a way for EXEC_ON_READ directives to see their context
(parent directive). Usually, this context is not also EXEC_ON_READ so it's not fully processed, so e.g cmd->path is not fluffed up yet because the closing tag of the section is not read yet and ap_check_cmd_context() doesn't work) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1656058 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/config.c')
-rw-r--r--server/config.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/server/config.c b/server/config.c
index 50fa76d98c..d8afca7a34 100644
--- a/server/config.c
+++ b/server/config.c
@@ -841,7 +841,8 @@ AP_DECLARE(module *) ap_find_linked_module(const char *name)
#define AP_MAX_ARGC 64
static const char *invoke_cmd(const command_rec *cmd, cmd_parms *parms,
- void *mconfig, const char *args)
+ void *mconfig, const char *args,
+ ap_directive_t *parent)
{
int override_list_ok = 0;
char *w, *w2, *w3;
@@ -870,6 +871,7 @@ static const char *invoke_cmd(const command_rec *cmd, cmd_parms *parms,
parms->info = cmd->cmd_data;
parms->cmd = cmd;
+ parms->parent = parent;
switch (cmd->args_how) {
case RAW_ARGS:
@@ -1306,7 +1308,7 @@ static const char *ap_walk_config_sub(const ap_directive_t *current,
continue;
}
- retval = invoke_cmd(cmd, parms, dir_config, current->args);
+ retval = invoke_cmd(cmd, parms, dir_config, current->args, NULL);
if (retval != NULL && strcmp(retval, DECLINE_CMD) != 0) {
/* If the directive in error has already been set, don't
@@ -1670,7 +1672,7 @@ static const char *execute_now(char *cmd_line, const char *args,
const char *retval;
cmd = ml->cmd;
- retval = invoke_cmd(cmd, parms, sub_tree, args);
+ retval = invoke_cmd(cmd, parms, sub_tree, args, parent);
if (retval != NULL) {
return retval;