You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodent of Unusual Size <CO...@PROCESS.COM> on 1997/11/25 21:17:00 UTC

Re: config/1480: Protect optional directives in .conf-dist files

>From the fingers of Marc Slemko flowed the following:
>
>On 25 Nov 1997, Ken A L Coar wrote:
>
>> Non-core directives, or at least those in modules that are typically
>> not included in an httpd binary, should be protected in the .conf-dist
>> files by putting them in <IfModule> containers.  For example, the
>> proxy directives should appear inside a <IfModule mod_proxy.c>
>> block.
>
>Why?  All I can see that doing is confusing users.  I don't see many
>problems with people uncommenting things they don't want to, and having an
>error message pop up if they uncomment them without having the module in
>is a good thing.

    Because some people assume that if we include the directive in the
    .conf-dist files, they can uncomment them with impunity.  This is
    typically not the case with the proxy.

    The error message that "pops up" doesn't make it at all clear that
    you need to rebuild with the module that supports the directive.
    The exact same message comes up whether you use "ProxyRemote" with
    the module not in the server, or "PrxyRemote" with it in.  In short,
    you can't tell from the error whether you've misspelt something or
    are just missing the functionality.

    At least putting the probably-not-in directives within <IfModule>
    blocks will make it clear that they need the module.

    Put it another way: *how* is this going to confuse users?  I see two
    at least two PRs that came in as a result of simply uncommenting
    something in the .conf-dist file.

    #ken    P-|}

Re: config/1480: Protect optional directives in .conf-dist files

Posted by Marc Slemko <ma...@worldgate.com>.
On Tue, 25 Nov 1997, Rodent of Unusual Size wrote:

> >From the fingers of Marc Slemko flowed the following:
> >
> >On 25 Nov 1997, Ken A L Coar wrote:
> >
> >> Non-core directives, or at least those in modules that are typically
> >> not included in an httpd binary, should be protected in the .conf-dist
> >> files by putting them in <IfModule> containers.  For example, the
> >> proxy directives should appear inside a <IfModule mod_proxy.c>
> >> block.
> >
> >Why?  All I can see that doing is confusing users.  I don't see many
> >problems with people uncommenting things they don't want to, and having an
> >error message pop up if they uncomment them without having the module in
> >is a good thing.
> 
>     Because some people assume that if we include the directive in the
>     .conf-dist files, they can uncomment them with impunity.  This is
>     typically not the case with the proxy.
> 
>     The error message that "pops up" doesn't make it at all clear that
>     you need to rebuild with the module that supports the directive.
>     The exact same message comes up whether you use "ProxyRemote" with
>     the module not in the server, or "PrxyRemote" with it in.  In short,
>     you can't tell from the error whether you've misspelt something or
>     are just missing the functionality.
> 
>     At least putting the probably-not-in directives within <IfModule>
>     blocks will make it clear that they need the module.
> 
>     Put it another way: *how* is this going to confuse users?  I see two
>     at least two PRs that came in as a result of simply uncommenting
>     something in the .conf-dist file.

Most such PRs are from people _WANTING_ the functionality.  Using an
IfModule will just confuse them even more, because they will not know that
it isn't compiled in.  Name some PRs that are caused by someone
uncommenting directives that they don't want.  Compare those to the number
of PRs from someone uncommenting directives that they do want but the
module isn't included, plus all the people that figured out they needed
the module by themself.  You will eliminate or make much more difficult to
diagnose all the latter, to eliminate the very few former.

I don't see what you are trying to help by this.  If they uncomment
directives, they presumably do it for a reason; if we IfModule everything,
all we do is hide problems.  Users will have no idea that this section of
directives isn't getting read because the proxy isn't compiled in, etc.
There is no point in complicating the distributed config files any more
than necessary.

And then you suggest changing the code to log a message everytime IfModule
is used but the module isn't compiled in.  IfModule is not designed to
stop people from getting errors when they uncomment sections of the config
they don't have modules compiled in for.  I would suggest it is used far
more commonly to allow people to run the same config file with different
binaries, and spitting out error messages all the time breaks that.