You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Doug MacEachern <do...@telebusiness.co.nz> on 1998/01/11 01:46:26 UTC

[PATCH] add -C and -c switches (take 3)

This patch includes the suggestions for usage(), and will only skip
require of conf/httpd.conf if -C or -c is present.  Also, a change to
util.c:pcfg_openfile(), if name is NULL, don't try the fopen(), just
alloc a new configfile_t, which is now called by
process_command_config().  Without this, certain directives (e.g.
Location) who try to access cmd->config_file will dump core.

-Doug



Re: [PATCH] add -C and -c switches (take 3)

Posted by Doug MacEachern <do...@telebusiness.co.nz>.
Rodent of Unusual Size wrote:

> I haven't been able to really test anything for a while, and probably
> won't be able to for a while longer, so these questions may have simple
> answers that I just haven't been able to get at.
>
> Can multiple switches be given on either/both UNIX and Win32?  I.e.,
>
>   httpd -c "<Directory />" -c " Options None" -c "</Directory>"

nope:
Syntax error in command: `<Directory /'
Missing </Directory> directive at end-of-file

Location and VirtualHost, and anyone who calls srm_command_loop do the same.

> If not, it seems to me that we're working towards a need for
> a directive delimiter (so multiple directives can be inlined like
> "<Directory />;Options None;</Directory>")..
>
> What happens if there's an error in one of the directives?  How is
> it referred to in the error message, since there isn't a line number?
> Should we log the processing of these beasties at DEBUG level?
>
> I'm still wondering whether
>
>   httpd -c "<VirtualHost foo>" -C "</VirtualHost>" -d /apache
>
> would have the expected result.

nope.  I think we could use a custom parms->config_file structure to make
these directives work as expected, perhaps with your delimiter idea.

-Doug


Re: [PATCH] add -C and -c switches (take 3)

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
I haven't been able to really test anything for a while, and probably
won't be able to for a while longer, so these questions may have simple
answers that I just haven't been able to get at.

Can multiple switches be given on either/both UNIX and Win32?  I.e.,

  httpd -c "<Directory />" -c " Options None" -c "</Directory>"

If not, it seems to me that we're working towards a need for
a directive delimiter (so multiple directives can be inlined like
"<Directory />;Options None;</Directory>")..

What happens if there's an error in one of the directives?  How is
it referred to in the error message, since there isn't a line number?
Should we log the processing of these beasties at DEBUG level?

I'm still wondering whether

  httpd -c "<VirtualHost foo>" -C "</VirtualHost>" -d /apache

would have the expected result.

While we're on the subject of command flags, does it bother anyone
else that "httpd -h" displays the complete list of compiled-in directives
rather than just a simple list of available flags?  When I want
a quick review of what flags a command has, I usually try "foo -h"
and "foo -\?" first - and the -h results in pages of output..

#ken	P-)}