From: André Malo Date: Fri, 2 May 2003 21:50:55 +0000 (+0000) Subject: Throw a warning if AllowOverride is used inside of or . X-Git-Tag: pre_ajp_proxy~1745 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08146d0cf36ec7b3d3295a1801385b43d9a6dede;p=apache Throw a warning if AllowOverride is used inside of or . Unfortunately there's no clean way to detect . It would not be sufficient, because should be checked then, too. Hmm. PR: 19512 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99695 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/core.c b/server/core.c index 328933ddab..9999e0932d 100644 --- a/server/core.c +++ b/server/core.c @@ -1213,6 +1213,13 @@ static const char *set_override(cmd_parms *cmd, void *d_, const char *l) return err; } + /* Throw a warning if we're in or */ + if (ap_check_cmd_context(cmd, NOT_IN_LOCATION | NOT_IN_FILES)) { + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, + "Useless use of AllowOverride in line %d.", + cmd->directive->line_num); + } + d->override = OR_NONE; while (l[0]) { w = ap_getword_conf(cmd->pool, &l);