You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Guenter Knauf <ef...@gmx.net> on 2004/03/09 02:25:08 UTC
[PATCH] mod_alias.c - add filename to log warning
Hi,
this patch adds the filename to the log warning since the problem can be in an included file and not only in httpd.conf.
--- mod_alias.c.orig Tue Feb 10 00:16:10 2004
+++ mod_alias.c Mon Mar 08 22:06:20 2004
@@ -137,9 +137,10 @@
if ( (!p->regexp && alias_matches(f, p->fake) > 0)
|| (p->regexp && !ap_regexec(p->regexp, f, 0, NULL, 0))) {
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
- "The %s directive at line %d will probably never "
+ "The %s directive in %s at line %d will probably never "
"match because it overlaps an earlier %sAlias%s.",
- cmd->cmd->name, cmd->directive->line_num,
+ cmd->cmd->name, cmd->directive->filename,
+ cmd->directive->line_num,
p->handler ? "Script" : "",
p->regexp ? "Match" : "");
Guenter.
Re: [PATCH] mod_alias.c - add filename to log warning
Posted by André Malo <nd...@perlig.de>.
* Guenter Knauf <ef...@gmx.net> wrote:
> can you perhaps commit it?
done.
Thanks for the reminder :)
nd
Re: [PATCH] mod_alias.c - add filename to log warning
Posted by Guenter Knauf <ef...@gmx.net>.
On Mar 9, 2004, at 9:00 AM, Dirk-Willem van Gulik wrote:
> On Mar 9, 2004, at 2:25 AM, Guenter Knauf wrote:
>> --- mod_alias.c.orig Tue Feb 10 00:16:10 2004
>> +++ mod_alias.c Mon Mar 08 22:06:20 2004
>> @@ -137,9 +137,10 @@
>> if ( (!p->regexp && alias_matches(f, p->fake) > 0)
>> || (p->regexp && !ap_regexec(p->regexp, f, 0, NULL,
>> 0))) {
>> ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
>> cmd->server,
>> - "The %s directive at line %d will
>> probably never "
>> + "The %s directive in %s at line %d will
>> probably never "
>> "match because it overlaps an earlier
>> %sAlias%s.",
>> - cmd->cmd->name, cmd->directive->line_num,
>> + cmd->cmd->name, cmd->directive->filename,
>> + cmd->directive->line_num,
>> p->handler ? "Script" : "",
>> p->regexp ? "Match" : "");
>>
> +1 - this has bitten me more than once.
me and a lot of users too;
can you perhaps commit it?
thanks, Guenter.
Re: [PATCH] mod_alias.c - add filename to log warning
Posted by Dirk-Willem van Gulik <di...@asemantics.com>.
On Mar 9, 2004, at 2:25 AM, Guenter Knauf wrote:
> --- mod_alias.c.orig Tue Feb 10 00:16:10 2004
> +++ mod_alias.c Mon Mar 08 22:06:20 2004
> @@ -137,9 +137,10 @@
> if ( (!p->regexp && alias_matches(f, p->fake) > 0)
> || (p->regexp && !ap_regexec(p->regexp, f, 0, NULL,
> 0))) {
> ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
> cmd->server,
> - "The %s directive at line %d will
> probably never "
> + "The %s directive in %s at line %d will
> probably never "
> "match because it overlaps an earlier
> %sAlias%s.",
> - cmd->cmd->name, cmd->directive->line_num,
> + cmd->cmd->name, cmd->directive->filename,
> + cmd->directive->line_num,
> p->handler ? "Script" : "",
> p->regexp ? "Match" : "");
>
+1 - this has bitten me more than once.
Dw