httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <>
Subject Re: [PATCH] catching malformed container directives
Date Thu, 11 Dec 2003 04:15:26 GMT

>>Now you have me thinking.  For Apache 2.1 (perhaps 2.0) I'd like to see that
>>particular nonsense go away.  I sympathize with André's observation that it's
>>useful, but what he wants to do can be accomplished with
>><IfDefine NEVER>
>>    DangerousDirective
>>which serves the same purpose, but it much more legible.
> not to speak for andre, but he pointed out to me on irc that what he was
> after was an <IfDefine> that could not be overridden with -D, and I suppose
> -DNEVER would expose the config block.  or are you suggesting a literal
> "<IfDefine NEVER>" as a special case?  one thing I suggested was perhaps
> using <IfDefine 0>, but he pointed out that -D0 works (but -D"" doesn't).
> so maybe we can make -D0 not work as well and keep with something that feels
> programmatically familiar.

yet another try :)

this patch makes 'httpd -D0' invalid, thus making <IfDefine 0> a special
define case that is guaranteed to evaluate to false.  the rest remains as
before - arguments are enforced across all containers.

it actually feels a bit strange to fail the command line args without some
kind of message, so I suppose it might be wiser to implement this in core.c
instead, tossing an error message to the error_log if "0" is both caught and
defined.  but for the moment I guess I'm just seeing if the idea is
appealing, after which the implementation can be adjusted as required.


View raw message