You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2010/03/21 19:37:00 UTC
svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS
docs/manual/mod/core.xml server/config.c
Author: minfrin
Date: Sun Mar 21 18:36:59 2010
New Revision: 925858
URL: http://svn.apache.org/viewvc?rev=925858&view=rev
Log:
core: Support wildcards in both the directory and file components of
the path specified by the Include directive.
Submitted by: minfrin, poirier
Reviewed by: minfrin, jim, poirier
Modified:
httpd/httpd/branches/2.2.x/CHANGES
httpd/httpd/branches/2.2.x/STATUS
httpd/httpd/branches/2.2.x/docs/manual/mod/core.xml
httpd/httpd/branches/2.2.x/server/config.c
Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=925858&r1=925857&r2=925858&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Sun Mar 21 18:36:59 2010
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache 2.2.16
+ *) core: Support wildcards in both the directory and file components of
+ the path specified by the Include directive. [Graham Leggett, Dan
+ Poirier]
Changes with Apache 2.2.15
Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=925858&r1=925857&r2=925858&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Sun Mar 21 18:36:59 2010
@@ -86,15 +86,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- * core: Support wildcards in both the directory and file components of
- the path specified by the Include directive.
- Trunk patch: http://svn.apache.org/viewvc?rev=909878&view=rev
- http://svn.apache.org/viewvc?rev=917735&view=rev
- http://svn.apache.org/viewvc?rev=917759&view=rev
- 2.2.x patch: http://people.apache.org/~minfrin/httpd-wildcard+docs2.patch
- Submitted by: minfrin, poirier
- +1: minfrin, jim, poirier
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
Modified: httpd/httpd/branches/2.2.x/docs/manual/mod/core.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/docs/manual/mod/core.xml?rev=925858&r1=925857&r2=925858&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/docs/manual/mod/core.xml (original)
+++ httpd/httpd/branches/2.2.x/docs/manual/mod/core.xml Sun Mar 21 18:36:59 2010
@@ -1513,20 +1513,33 @@ the server configuration files</descript
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context>
</contextlist>
-<compatibility>Wildcard matching available in 2.0.41 and later</compatibility>
+<compatibility>Wildcard matching available in 2.0.41 and later, directory
+wildcard matching available in 2.3.6 and later</compatibility>
<usage>
<p>This directive allows inclusion of other configuration files
from within the server configuration files.</p>
- <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used to
- include several files at once, in alphabetical order. In
- addition, if <directive>Include</directive> points to a directory,
- rather than a file, Apache will read all files in that directory
- and any subdirectory. But including entire directories is not
- recommended, because it is easy to accidentally leave temporary
- files in a directory that can cause <program>httpd</program> to
- fail.</p>
+ <p>Shell-style (<code>fnmatch()</code>) wildcard characters can be used
+ in the filename or directory parts of the path to include several files
+ at once, in alphabetical order. In addition, if
+ <directive>Include</directive> points to a directory, rather than a file,
+ Apache will read all files in that directory and any subdirectory.
+ However, including entire directories is not recommended, because it is
+ easy to accidentally leave temporary files in a directory that can cause
+ <program>httpd</program> to fail. Instead, we encourage you to use the
+ wildcard syntax shown below, to include files that match a particular
+ pattern, such as *.conf, for example.</p>
+
+ <p>When a wildcard is specified for a file or directory component of the
+ path, and no file or directory matches the wildcard, the
+ <directive module="core">Include</directive> directive will be
+ silently ignored. When a directory or file component of the path is
+ specified exactly, and that directory or file does not exist,
+ <directive module="core">Include</directive> directive will fail with an
+ error saying the file or directory cannot be found. This removes the need
+ for placeholder files to exist so that at least one file or directory is
+ found by the wildcard.</p>
<p>The file path specified may be an absolute path, or may be relative
to the <directive module="core">ServerRoot</directive> directory.</p>
Modified: httpd/httpd/branches/2.2.x/server/config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/server/config.c?rev=925858&r1=925857&r2=925858&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/server/config.c (original)
+++ httpd/httpd/branches/2.2.x/server/config.c Sun Mar 21 18:36:59 2010
@@ -1528,7 +1528,7 @@ static const char *process_command_confi
}
typedef struct {
- char *fname;
+ const char *fname;
} fnames;
static int fname_alphasort(const void *fn1, const void *fn2)
@@ -1639,6 +1639,107 @@ static const char *process_resource_conf
return NULL;
}
+static const char *process_resource_config_fnmatch(server_rec *s,
+ const char *path,
+ const char *fname,
+ ap_directive_t **conftree,
+ apr_pool_t *p,
+ apr_pool_t *ptemp,
+ unsigned depth)
+{
+ char *rest;
+ apr_status_t rv;
+ apr_dir_t *dirp;
+ apr_finfo_t dirent;
+ apr_array_header_t *candidates = NULL;
+ fnames *fnew;
+ int current;
+
+ /* find the first part of the filename */
+ rest = ap_strchr(fname, '/');
+ if (rest) {
+ fname = apr_pstrndup(ptemp, fname, rest - fname);
+ rest++;
+ }
+
+ /* optimisation - if the filename isn't a wildcard, process it directly */
+ if (!apr_fnmatch_test(fname)) {
+ path = ap_make_full_path(ptemp, path, fname);
+ if (!rest) {
+ return process_resource_config_nofnmatch(s, path,
+ conftree, p,
+ ptemp, 0);
+ }
+ else {
+ return process_resource_config_fnmatch(s, path, rest,
+ conftree, p,
+ ptemp, 0);
+ }
+ }
+
+ /*
+ * first course of business is to grok all the directory
+ * entries here and store 'em away. Recall we need full pathnames
+ * for this.
+ */
+ rv = apr_dir_open(&dirp, path, ptemp);
+ if (rv != APR_SUCCESS) {
+ char errmsg[120];
+ return apr_psprintf(p, "Could not open config directory %s: %s",
+ path, apr_strerror(rv, errmsg, sizeof errmsg));
+ }
+
+ candidates = apr_array_make(ptemp, 1, sizeof(fnames));
+ while (apr_dir_read(&dirent, APR_FINFO_DIRENT | APR_FINFO_TYPE, dirp) == APR_SUCCESS) {
+ /* strip out '.' and '..' */
+ if (strcmp(dirent.name, ".")
+ && strcmp(dirent.name, "..")
+ && (apr_fnmatch(fname, dirent.name,
+ APR_FNM_PERIOD) == APR_SUCCESS)) {
+ const char *full_path = ap_make_full_path(ptemp, path, dirent.name);
+ /* If matching internal to path, and we happen to match something
+ * other than a directory, skip it
+ */
+ if (rest && (rv == APR_SUCCESS) && (dirent.filetype != APR_DIR)) {
+ continue;
+ }
+ fnew = (fnames *) apr_array_push(candidates);
+ fnew->fname = full_path;
+ }
+ }
+
+ apr_dir_close(dirp);
+ if (candidates->nelts != 0) {
+ const char *error;
+
+ qsort((void *) candidates->elts, candidates->nelts,
+ sizeof(fnames), fname_alphasort);
+
+ /*
+ * Now recurse these... we handle errors and subdirectories
+ * via the recursion, which is nice
+ */
+ for (current = 0; current < candidates->nelts; ++current) {
+ fnew = &((fnames *) candidates->elts)[current];
+ if (!rest) {
+ error = process_resource_config_nofnmatch(s, fnew->fname,
+ conftree, p,
+ ptemp, 0);
+ }
+ else {
+ error = process_resource_config_fnmatch(s, fnew->fname, rest,
+ conftree, p,
+ ptemp, 0);
+ }
+ if (error) {
+ return error;
+ }
+ }
+ }
+
+ return NULL;
+}
+
AP_DECLARE(const char *) ap_process_resource_config(server_rec *s,
const char *fname,
ap_directive_t **conftree,
@@ -1663,80 +1764,24 @@ AP_DECLARE(const char *) ap_process_reso
0);
}
else {
- apr_dir_t *dirp;
- apr_finfo_t dirent;
- int current;
- apr_array_header_t *candidates = NULL;
- fnames *fnew;
- apr_status_t rv;
- char *path = apr_pstrdup(p, fname), *pattern = NULL;
-
- pattern = ap_strrchr(path, '/');
+ apr_status_t status;
+ const char *rootpath, *filepath = fname;
- AP_DEBUG_ASSERT(pattern != NULL); /* path must be absolute. */
+ /* locate the start of the directories proper */
+ status = apr_filepath_root(&rootpath, &filepath, APR_FILEPATH_TRUENAME, ptemp);
- *pattern++ = '\0';
-
- if (apr_fnmatch_test(path)) {
- return apr_pstrcat(p, "Wildcard patterns not allowed in Include ",
- fname, NULL);
+ /* we allow APR_SUCCESS and APR_EINCOMPLETE */
+ if (APR_ERELATIVE == status) {
+ return apr_pstrcat(p, "Include must have an absolute path, ", fname, NULL);
}
-
- if (!ap_is_directory(p, path)){
- return apr_pstrcat(p, "Include directory '", path, "' not found",
- NULL);
+ else if (APR_EBADPATH == status) {
+ return apr_pstrcat(p, "Include has a bad path, ", fname, NULL);
}
- if (!apr_fnmatch_test(pattern)) {
- return apr_pstrcat(p, "Must include a wildcard pattern for "
- "Include ", fname, NULL);
- }
-
- /*
- * first course of business is to grok all the directory
- * entries here and store 'em away. Recall we need full pathnames
- * for this.
- */
- rv = apr_dir_open(&dirp, path, p);
- if (rv != APR_SUCCESS) {
- char errmsg[120];
- return apr_psprintf(p, "Could not open config directory %s: %s",
- path, apr_strerror(rv, errmsg, sizeof errmsg));
- }
-
- candidates = apr_array_make(p, 1, sizeof(fnames));
- while (apr_dir_read(&dirent, APR_FINFO_DIRENT, dirp) == APR_SUCCESS) {
- /* strip out '.' and '..' */
- if (strcmp(dirent.name, ".")
- && strcmp(dirent.name, "..")
- && (apr_fnmatch(pattern, dirent.name,
- APR_FNM_PERIOD) == APR_SUCCESS)) {
- fnew = (fnames *) apr_array_push(candidates);
- fnew->fname = ap_make_full_path(p, path, dirent.name);
- }
- }
-
- apr_dir_close(dirp);
- if (candidates->nelts != 0) {
- const char *error;
-
- qsort((void *) candidates->elts, candidates->nelts,
- sizeof(fnames), fname_alphasort);
+ /* walk the filepath */
+ return process_resource_config_fnmatch(s, rootpath, filepath, conftree, p, ptemp,
+ 0);
- /*
- * Now recurse these... we handle errors and subdirectories
- * via the recursion, which is nice
- */
- for (current = 0; current < candidates->nelts; ++current) {
- fnew = &((fnames *) candidates->elts)[current];
- error = process_resource_config_nofnmatch(s, fnew->fname,
- conftree, p,
- ptemp, 0);
- if (error) {
- return error;
- }
- }
- }
}
return NULL;
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/21/2010 7:16 PM, Dan Poirier wrote:
> On 2010-03-21 at 16:14, "William A. Rowe Jr." <wr...@rowe-clan.net> wrote:
>
>> No-match of a wildcard must result in an error.
>
> Why? It doesn't before this change. E.g.
>
> Include /existingdirectory/nosuchfile*.conf
>
> starts without error, and that seems fine to me - the directive says to
> include all files matching that pattern, and all zero files that match
> are indeed included.
It does not seem fine to perpetuate this approach, in that it results in
far more lost troubleshooting hours and stupid users/support questions
than it gains. I suggest nothing is gained, that a placeholder file couldn't
accomplish.
The existing behavior of your example is much easier to debug and catch the
config error than the new feature introduces, which adds typos or spelling
errors to the directory path, or the miscount of directory depth, etc, etc.
A prerequisite of putting an out an empty that matches the pattern doesn't
seem onerous, is it? It forces the administrator to be deliberate in their
configuration, to complete that configuration with an explict new file.
Otherwise, Include conf/nothere.conf should be allowed; after all they might
want to move this file out of the way without causing an error. But that
would be a foolish feature, as is permitting no files to match a wildcard.
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by Dan Poirier <po...@pobox.com>.
On 2010-03-21 at 16:14, "William A. Rowe Jr." <wr...@rowe-clan.net> wrote:
> No-match of a wildcard must result in an error.
Why? It doesn't before this change. E.g.
Include /existingdirectory/nosuchfile*.conf
starts without error, and that seems fine to me - the directive says to
include all files matching that pattern, and all zero files that match
are indeed included.
Dan
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS docs/manual/mod/core.xml server/config.c
Posted by Graham Leggett <mi...@sharp.fm>.
On 24 Mar 2010, at 12:33 AM, William A. Rowe Jr. wrote:
>> In the wild I see that pattern all the time, a configuration
>> directory
>> containing some equivalent of empty.conf, to work around this
>> limitation. Without this empty.conf file, you run the opposite risk -
>> someone removing the last config file from a directory, and the
>> server
>> suddenly stops working without warning.
>
> Whoa. There is a warning. ./apachectl yells, ./apachectl -t yells,
> even
> bootup service logs yell (Starting httpd... [FAILED] or similar).
> That
> is not a description of 'without warning'.
"Without warning" means "ops just uninstalled app-foo-<version>.rpm,
gracefully restarted, and suddenly the server is refusing to start,
and ops had no warning this would happen".
Sure ops can start reverse engineering the error messages to try and
work around the problem, but a sudden refusal to start isn't the
expected behaviour after a website package is removed.
In our environment, there are no fat fingers - if the website isn't
packaged, it isn't allowed to be installed[1], and we have int servers
for people to break if necessary before a website is deployed for
real. A far harder problem for us to solve are the sites that work by
accident, and then break when the crutch they were leaning on is
removed, and this feature adds risk for us, not reduces it. (RPMs are
by their nature atomic, they give you zero configuration options, and
therefore - in theory - zero opportunities for someone to misconfigure
it[2]).
This is not to say that our environment is the only deployment
scenario out there, which is why I think this suggestion is the safest
compromise:
> If you believe the feature is necessary, introduce a NEW unambiguous
> feature
> instead of overloading. E.g. "IncludeOptional /optional/include"
> for allowing
> the include to fail.
[1] We have a standing rule that if it cannot be uninstalled cleanly,
then it cannot be installed in the first place.
[2] RPMs are atomic in theory, but the capacity for a thankfully small
group of developers to turn a simple straightforward concept into a
quagmire of confusion is quite alarming.
Regards,
Graham
--
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/23/2010 5:10 PM, Graham Leggett wrote:
> On 21 Mar 2010, at 10:14 PM, William A. Rowe Jr. wrote:
>
>> No-match of a wildcard must result in an error. If you are arguing
>> that httpd
>> should allow the admin to create conf/vhosts/*, only populated if they
>> are created,
>> then I'll counter that would be fine, just populate
>> conf/vhosts/empty.conf with no
>> lines, the error would go away, and supporting no-matches is never
>> necessary.
>
> In the wild I see that pattern all the time, a configuration directory
> containing some equivalent of empty.conf, to work around this
> limitation. Without this empty.conf file, you run the opposite risk -
> someone removing the last config file from a directory, and the server
> suddenly stops working without warning.
Whoa. There is a warning. ./apachectl yells, ./apachectl -t yells, even
bootup service logs yell (Starting httpd... [FAILED] or similar). That
is not a description of 'without warning'.
Without warning means things start up, without their config changes, and
zero hint why their config changes are not taking effect. They are given
no reason to suspect that their miskeyed Include ... pattern is not working.
Explain to me where the warning is for missing configuration files in the
current backport? [Yes, accepting it was never there for conf/host-*.conf
style patterns, not accepting this was a good thing.]
So there is an opposite risk, one which clearly identifies the line number
and config file which has a newly introduced flaw. I won't accept that
the last file magically 'disappearing' is an acceptable thing to permit,
if something has disappeared I then expect httpd to alert!!!
> In our case, web applications
> are packaged as RPMs, so it's entirely possible for a directory to
> become empty without warning when an RPM is uninstalled.
and that is entirely correct because, I would presume, that config template
is of the package that consumed the empty directory, e.g. some binaries,
modules or other scripts that depended on the config in such a tree. Right?
RPM must have a some 'hands of' mechanism to deposit a file for good, no?
You wouldn't remove such a directory (along with its 'empty' file?) if you
mean for it to go away?
And if an installer has gone and mucked with a config file, it aught to
be un-mucking that config on the way out the door.
Essentially, you are asking for this feature to make one case, package
installers, work in a brainless fashion; I'm pointing out you can't be
hacking httpd in such a way to cripple the feature present for those who
are using httpd with a brain (or half-brained, where they've introduced
a typo into their path name).
> As a result, enforcing no-match == fail doesn't buy you anything at all.
What? Yes, it buys confirmation that a file was processed when httpd is
explicitly told to process a file.
> I don't have strong opinions either way, the empty.conf directorie in
> our case are already present, so changing this isn't too much of a
> problem - I just need to get some sleep first.
If you believe the feature is necessary, introduce a NEW unambiguous feature
instead of overloading. E.g. "IncludeOptional /optional/include" for allowing
the include to fail.
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS docs/manual/mod/core.xml server/config.c
Posted by Graham Leggett <mi...@sharp.fm>.
On 21 Mar 2010, at 10:14 PM, William A. Rowe Jr. wrote:
> No-match of a wildcard must result in an error. If you are arguing
> that httpd
> should allow the admin to create conf/vhosts/*, only populated if
> they are created,
> then I'll counter that would be fine, just populate conf/vhosts/
> empty.conf with no
> lines, the error would go away, and supporting no-matches is never
> necessary.
In the wild I see that pattern all the time, a configuration directory
containing some equivalent of empty.conf, to work around this
limitation. Without this empty.conf file, you run the opposite risk -
someone removing the last config file from a directory, and the server
suddenly stops working without warning. In our case, web applications
are packaged as RPMs, so it's entirely possible for a directory to
become empty without warning when an RPM is uninstalled.
As a result, enforcing no-match == fail doesn't buy you anything at all.
I don't have strong opinions either way, the empty.conf directorie in
our case are already present, so changing this isn't too much of a
problem - I just need to get some sleep first.
Regards,
Graham
--
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by HyperHacker <hy...@gmail.com>.
On Sun, Mar 21, 2010 at 14:28, William A. Rowe Jr. <wr...@apache.org> wrote:
> On 3/21/2010 3:14 PM, William A. Rowe Jr. wrote:
>>
>> Include conf/empty/*
>>
>> Include conf/*/whoops.conf
>>
>> The last one (based on an existing conf/empty directive) fails, alerting the admin
>> to the fact that they made a typo, which is good.
>
> What I meant to point out was that if conf/empty directory doesn't exist, the
> first one fails. If conf/empty is then created but left empty, the server starts
> without so much as a warning.
>
> Even Include conf/extra.conf works, where extra.conf isn't a file but an empty
> directory. Think of all the ways the user can confuse themselves with this new
> feature.
>
The former seems like correct behaviour: it's including all files in
the directory, which is none. You might want to be able to move files
in an out of that directory for convenience. The latter does seem like
a bug - specifying a directory without a /* should trigger a warning.
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by "William A. Rowe Jr." <wr...@apache.org>.
On 3/21/2010 3:14 PM, William A. Rowe Jr. wrote:
>
> Include conf/empty/*
>
> Include conf/*/whoops.conf
>
> The last one (based on an existing conf/empty directive) fails, alerting the admin
> to the fact that they made a typo, which is good.
What I meant to point out was that if conf/empty directory doesn't exist, the
first one fails. If conf/empty is then created but left empty, the server starts
without so much as a warning.
Even Include conf/extra.conf works, where extra.conf isn't a file but an empty
directory. Think of all the ways the user can confuse themselves with this new
feature.
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/28/2010 7:00 PM, Graham Leggett wrote:
>
> I strongly object to any difference in behaviour between directories and
> files (as in, I would -1 it).
Then it seems we can't come to a conclusion on this matter. Please revert
the backport, I remain -1 as it stands, so our respective votes leave no
room for this functionality in 2.2.
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/29/2010 5:59 PM, Graham Leggett wrote:
>
> As it turns out that the optional behaviour is the current default
> behaviour, and because you were not aware of this when you made your
> suggestion above, it is necessary for the option to become IncludeStrict
> instead of IncludeOptional.
Trunk is not released, it is still up for discussion. You (and I, and the
few other very active committers) cannot expect people to keep up with the
pace of commits, as much as we would like to.
The veto applies to trunk, as well. It's just that it's not terribly
disruptive to leave the vetoed code on trunk, since it is very unlikely
we will tag GA in the coming days or weeks. I have no dispute with the
code itself, so I don't see a reason to disrupt the work of coming to
an acceptable agreement.
The 2.2 branch behavior is that filenames do not require a match. File
paths do require a match. I have suggested that the typical user, even
the experienced user is paying attention to Include [foo] as a literal,
and is harmed when [foo] is accepted and does not exist. This makes as
much sense as allowing LoadModule [foo] or LoadFile [foo] to succeed
when [foo] does not exist.
If a very small minority of users desire a feature that is harmful to the
general community, the onus is on the minority of users to propose and
implement their feature in a way that doesn't disrupt the vast majority
of users, or cause them inconvenience.
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/31/2010 2:11 PM, Graham Leggett wrote:
>
> You have just argued above for a brand new feature
Graham, come back to earth and rejoin the dialog already in progress.
I advocated for a feature, but insisted on repair to YOUR new feature
before it went into 2.2. That is all.
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS docs/manual/mod/core.xml server/config.c
Posted by Graham Leggett <mi...@sharp.fm>.
On 31 Mar 2010, at 2:33 AM, William A. Rowe Jr. wrote:
> On 2.2 branch, we are hamstrung by the stable shipping behavior, you
> are
> right that we cann only fail 2 and 4.
>
> On trunk, all of these can fail by default, unless a permissive
> directive
> is used to indicate the config author believes they know what they are
> doing, and accepts the consequences of chasing down their own typos if
> things just 'don't happen' when they change the mis-directed config.
No Bill, this is not how things are done.
You have just argued above for a brand new feature - a change to the
behaviour of wildcard support in httpd. Ordinarily, one would propose
this new feature on this list as a single issue and ask the rest of us
for comments. Or you might have even patched trunk, and used that as a
basis for the discussion over whether such a change was warranted. You
would have provided evidence of problems encountered by people making
typos by pointing out threads on the user's mailing list, you could
have even just told us "I help lots of people who make these typos,
and they really need to be helped" and we would have believed you.
But you didn't do that. You took an entirely unrelated feature, the
extension of wildcard support to directories in addition to files, a
feature that had been explicitly approved by three people as per the
long standing voting rules of this project, and you vetoed it, on the
basis that somebody else's work didn't have your unrelated change
built into it. Did you propose or discuss your unrelated change on the
list beforehand? No. Did you respect the opinions of the three people
who were happy with this change? No. Did you provide any evidence that
your feature was even necessary? No. Did you provide your own patch,
implementing the change you wanted? No. You went straight for the
veto, do not pass go, not not collect 200 pounds. You were so
confident in your veto that you didn't even stop to check if your veto
had hit the list (it hadn't, thanks to dodgy mail clients).
Seriously, this kind of thing has got to stop.
> Yes, we've all seen vetoes thrown around without any explanation,
> without
> the author willing to revisit, refine and reclarify the objection,
> in light
> of additional information. You and I did refine and reclarify this
> veto,
> many times, in the process. In the end, we were able to refine a
> solution
> without having to go to the extreme of a F2F powwow. That's a
> positive.
No Bill, I refined the solution. I provided the patch, I provided the
documentation, and I provided most of my saturday, a lot of my sunday,
and my whole monday night and tuesday night trying to make sure that a
problem that has negatively affected a large number of people stayed
solved. You provided the whip, and undid most of the work by backing
out an approved backport, that was pretty much it.
> And yes, the project is more than willing to lose contributions
> which are
> not thought out; we do so frequently if the bugzilla
> 'PatchAvailable' tag
> is a measure of which patches are 'interesting'. The difference is
> the
> disagreement between an arbitrary contributor v.s. a committer.
No, we lose patches because of limited time from limited committers.
Do not underestimate or try to downplay the importance of a patch from
an arbitrary contributer. They've spent their own time and effort
formulating the patch, contributing it to us, justifying its
inclusion, and our license obliges nobody to do that.
Encourage arbitrary contributers by respecting the work they put in
and they become regular contributers, and then they become committers,
and then members.
> Your definition of progress isn't necessarily my definition, or
> Paul's or
> Jim's or Ruediger's. Each committer is here looking at the code
> from their
> own perspective, and I hold the greatest respect for the committers
> who
> clearly are looking out for the interests of several groups of users
> at
> once, not the committers who might be here to advance only their own
> agenda.
> In other words, TMTOWTDI, most of the time, and collaboration means
> moving
> forwards to let as many improvements in that don't disrupt other
> groups of
> users or developers.
I honestly couldn't care in the slightest which committer has
contributed what, or what their agenda is, all I care about is whether
a contribution adds value to the project on a case by case basis, and
whether the lives of webmasters and end users are made more pleasant
as a result.
I have the greatest respect for the committers who have stuck around
and do actual work, and that includes you Bill, and is why we're
having this discussion.
Currently it is my agenda to take the inhouse experience of one of the
world's biggest media organisations whose average daily traffic
pattern would be described as a "distributed denial of service attack"
by everyone else, and share that experience with other users of the
httpd server. It also happens to be the agenda of a number of other
ASF members working for the same organisation.
Given the number of people who want to build "fast" webservers these
days, I am focusing on making sure there are still "reliable"
webservers available in the market, of which httpd is arguably still
the best example to date.
>> Months and months of work by various ASF members convincing people in
>> this particular organisation that it is a good idea to pass their
>> changes upstream to the original project instead of hiding their
>> code in
>> silos, and now they're told "you can just do what you've been doing
>> all
>> along, keep your changes to yourself". Thanks for the help Bill.
>
> You presume that all changes are suitable as-is?
No, I presume that changes will be suitably peer reviewed by other
members of this project, commented on and changed as appropriate, and
if proposed for backport agreed upon by at least three of the
project's members, in the way that is has always been, or at least how
it's been during the decade-and-a-bit I've been contributing patches
to this project. I do not presume that changes will be stomped on and
killed through misuse of the veto mechanism.
> Include strict path is an improvement in 2.2, yes, although one that
> will go
> away in trunk (since all Include statements should find some file to
> Include,
> unless the clever/attentive adminstrator tags them 'optional'). I
> suspect
> that an IncludeOptional directive is more efficient, I'm happy to
> offer the
> patch to your patch after I svn revert my local code changes. The
> cost of
> another hashed directive is less expensive than parsing for multiple
> args.
Either is as easy as the other, I implemented both in the last few
days. And I don't mind whatever feature you put in, as long as I and
everyone else has the option to switch it off.
Regards,
Graham
--
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/30/2010 5:17 PM, Graham Leggett wrote:
> On 30 Mar 2010, at 3:34 AM, William A. Rowe Jr. wrote:
>
>> In what universe does the suggestion that path wildcards must correspond
>> to at least one existing path diverge from the allowance that the path(s)
>> need not contain one existing file? Two separate issues, one veto.
>
> In your universe, you were arguing for this very thing:
>
> "The gist of my objection is this illegitimate behavior;
>
> Include conf/extra/*.duh
>
> Include conf/extra/*/doh.conf
>
> Include conf/empty/*
>
> Include conf/*/whoops.conf
>
> The last one (based on an existing conf/empty directive) fails, alerting
> the admin
> to the fact that they made a typo, which is good.
>
> The others all fail-to-fail with this logic [based on the absence of any
> matching
> directories in the extra/ folder]. That's unacceptable."
>
> It was a perfectly valid objection, based on the principle of least
> surprise. Then when it was discovered that options 1 and 3 currently
> pass today and have done for a long time, you changed your mind and
> decided that only options 2 and 4 should fail, and that it was suddenly
> ok to be inconsistent, contradicting yourself. Please make up your mind.
On 2.2 branch, we are hamstrung by the stable shipping behavior, you are
right that we cann only fail 2 and 4.
On trunk, all of these can fail by default, unless a permissive directive
is used to indicate the config author believes they know what they are
doing, and accepts the consequences of chasing down their own typos if
things just 'don't happen' when they change the mis-directed config.
>> I'm sorry you don't support my -1, but am done with your handwaving about
>> whether the the veto is valid, or not. It is, and your protestations
>> don't
>> invalidate it.
>
> Of course my protestations don't invalidate it, your inconsistent
> technical justification invalidates it.
Trunk may be inconsistent with 2.2 branch, it frequently is.
> In theory, vetos are really cheap. They take zero effort to make, and
> all they take to enforce are to to engage in a Monty Python style
> yes-it-is-no-it-isn't argument until the other side gets fed up and
> withdraws their contribution. The person with the veto wins, the project
> loses the contribution.
Yes, we've all seen vetoes thrown around without any explanation, without
the author willing to revisit, refine and reclarify the objection, in light
of additional information. You and I did refine and reclarify this veto,
many times, in the process. In the end, we were able to refine a solution
without having to go to the extreme of a F2F powwow. That's a positive.
And yes, the project is more than willing to lose contributions which are
not thought out; we do so frequently if the bugzilla 'PatchAvailable' tag
is a measure of which patches are 'interesting'. The difference is the
disagreement between an arbitrary contributor v.s. a committer.
> In practice, vetos are very very expensive.
>
> They discourage end users from contributing to the project, because why
> should they bother spending their free time and effort when there is a
> very real risk that someone will arbitrarily object and then instead of
> agreeing to disagree, will happily obstruct progress using a veto on the
> issue to the detriment of end users.
Your definition of progress isn't necessarily my definition, or Paul's or
Jim's or Ruediger's. Each committer is here looking at the code from their
own perspective, and I hold the greatest respect for the committers who
clearly are looking out for the interests of several groups of users at
once, not the committers who might be here to advance only their own agenda.
In other words, TMTOWTDI, most of the time, and collaboration means moving
forwards to let as many improvements in that don't disrupt other groups of
users or developers.
> They discourage reviewers from reviewing backports, because why should
> they go to the effort of picking through patches, applying them,
> compiling code, running test suites and code and editing documentation,
> and then finally to promote the patch, only to have somebody eventually
> wake up and yank it out again, forcing everyone to start the process all
> over again.
>
> Vetos should be used *very* sparingly, and as an absolute last resort to
> a problem, in recognition of the cost associated with them. It should be
> far more common for members of a project to simply agree to disagree and
> let consensus decide than it is for people to veto anything.
And considering the raw volume of code I review at a glance and in depth,
I certainly don't use them often, in fact the entire project doesn't use
them often. The previous veto I saw was Lars' objection to allowing the
ServerString to misrepresent Apache 'out off the box'. (Nobody objects to
the user modifying the code and relabeling the program, of course).
>> Then they are welcome to use a patched version of httpd; this is the
>> advantage of open source.
>
> Months and months of work by various ASF members convincing people in
> this particular organisation that it is a good idea to pass their
> changes upstream to the original project instead of hiding their code in
> silos, and now they're told "you can just do what you've been doing all
> along, keep your changes to yourself". Thanks for the help Bill.
You presume that all changes are suitable as-is? Horsepucky. The point to
offering patches back is a convenience factor, of course. But the real reason
to offer patches upstream is to improve them. Apache software is not about
accepting all of the submissions offered, it is about collaborating to improve
on the best of those submissions.
Everyone wants to see their changes in 2.2.next, but that is unrealistic. It's
enough that their changes hit trunk, to see the light of day in the next major
release. The trick to manage users expectations is to deliver that next major
version more than once every five years.
>> Anyone can use whatever code they like whether
>> they agree with the 'released' version, or not. There is a solution on
>> the table which could satisfy everyone, allowing a missing explicit file,
>> or file pattern, or directory pattern to match nothing - while making no
>> change in 2.2 to the Include behavior of allowing file patterns to not
>> match once the directory pattern has matched.
>
> No, there isn't a solution on the table, I should know, all the
> solutions we're discussing were written by, tested by, and documented by
> me.
>
> Now there is. Following my own advice I withdraw my veto over the
> inconsistent Include behaviour that you want as it is better for end
> users for us to agree to disagree. I've documented this behaviour
> clearly for end users, and provided both an "Include optional path" and
> "Include strict path" option for those users who require consistent
> behaviour one way or the other.
>
> Your objection is now resolved in r929318.
Include strict path is an improvement in 2.2, yes, although one that will go
away in trunk (since all Include statements should find some file to Include,
unless the clever/attentive adminstrator tags them 'optional'). I suspect
that an IncludeOptional directive is more efficient, I'm happy to offer the
patch to your patch after I svn revert my local code changes. The cost of
another hashed directive is less expensive than parsing for multiple args.
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS docs/manual/mod/core.xml server/config.c
Posted by Graham Leggett <mi...@sharp.fm>.
On 30 Mar 2010, at 3:34 AM, William A. Rowe Jr. wrote:
> In what universe does the suggestion that path wildcards must
> correspond
> to at least one existing path diverge from the allowance that the
> path(s)
> need not contain one existing file? Two separate issues, one veto.
In your universe, you were arguing for this very thing:
"The gist of my objection is this illegitimate behavior;
Include conf/extra/*.duh
Include conf/extra/*/doh.conf
Include conf/empty/*
Include conf/*/whoops.conf
The last one (based on an existing conf/empty directive) fails,
alerting the admin
to the fact that they made a typo, which is good.
The others all fail-to-fail with this logic [based on the absence of
any matching
directories in the extra/ folder]. That's unacceptable."
It was a perfectly valid objection, based on the principle of least
surprise. Then when it was discovered that options 1 and 3 currently
pass today and have done for a long time, you changed your mind and
decided that only options 2 and 4 should fail, and that it was
suddenly ok to be inconsistent, contradicting yourself. Please make up
your mind.
> I'm sorry you don't support my -1, but am done with your handwaving
> about
> whether the the veto is valid, or not. It is, and your
> protestations don't
> invalidate it.
Of course my protestations don't invalidate it, your inconsistent
technical justification invalidates it.
In theory, vetos are really cheap. They take zero effort to make, and
all they take to enforce are to to engage in a Monty Python style yes-
it-is-no-it-isn't argument until the other side gets fed up and
withdraws their contribution. The person with the veto wins, the
project loses the contribution.
In practice, vetos are very very expensive.
They discourage end users from contributing to the project, because
why should they bother spending their free time and effort when there
is a very real risk that someone will arbitrarily object and then
instead of agreeing to disagree, will happily obstruct progress using
a veto on the issue to the detriment of end users.
They discourage reviewers from reviewing backports, because why should
they go to the effort of picking through patches, applying them,
compiling code, running test suites and code and editing
documentation, and then finally to promote the patch, only to have
somebody eventually wake up and yank it out again, forcing everyone to
start the process all over again.
Vetos should be used *very* sparingly, and as an absolute last resort
to a problem, in recognition of the cost associated with them. It
should be far more common for members of a project to simply agree to
disagree and let consensus decide than it is for people to veto
anything.
> Then they are welcome to use a patched version of httpd; this is the
> advantage of open source.
Months and months of work by various ASF members convincing people in
this particular organisation that it is a good idea to pass their
changes upstream to the original project instead of hiding their code
in silos, and now they're told "you can just do what you've been doing
all along, keep your changes to yourself". Thanks for the help Bill.
> Anyone can use whatever code they like whether
> they agree with the 'released' version, or not. There is a solution
> on
> the table which could satisfy everyone, allowing a missing explicit
> file,
> or file pattern, or directory pattern to match nothing - while
> making no
> change in 2.2 to the Include behavior of allowing file patterns to not
> match once the directory pattern has matched.
No, there isn't a solution on the table, I should know, all the
solutions we're discussing were written by, tested by, and documented
by me.
Now there is. Following my own advice I withdraw my veto over the
inconsistent Include behaviour that you want as it is better for end
users for us to agree to disagree. I've documented this behaviour
clearly for end users, and provided both an "Include optional path"
and "Include strict path" option for those users who require
consistent behaviour one way or the other.
Your objection is now resolved in r929318.
Regards,
Graham
--
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/29/2010 7:18 PM, Graham Leggett wrote:
> On 30 Mar 2010, at 1:18 AM, William A. Rowe Jr. wrote:
>
>>> As it turns out that the optional behaviour is the current default
>>> behaviour, and because you were not aware of this when you made your
>>> suggestion above, it is necessary for the option to become IncludeStrict
>>> instead of IncludeOptional.
>>
>> The default behavior of -trunk-. Right now, nobody has voted that
>> trunk is
>> in an appropriate state for general availability. The default
>> behavior of
>> 2.2 is that only filename wildcards are allowed to not-match.
>
> That's because directory wildcards aren't supported in v2.2 at all and
> never were. You cannot claim that functionality that was never there
> somehow affirms a particular behaviour one way or another.
Correct, it doesn't affirm the behavior either way. It simply says that
no *files* matching the regex pattern are acceptable. I disagree, but that
is a subject for discussion of trunk, not 2.2, you are absolutely right in
suggesting we won't change this on 2.2, or 2.0 branches.
> The basic fact remains, you thought the default behaviour of the server
> was that a file no-match returned an error, and I too thought that until
> saturday, when I spent a whole lot of time trying to pick apart what was
> going on to resolve your veto. In the light of your original
> understanding, a veto made perfect sense - if a file no-match returned
> failure, then directory no-match should too return failure, to be
> consistent, non confusing for the end user, and to follow the principle
> of least surprise.
>
> Then it is uncovered that the default behaviour of the server was the
> complete opposite: the default behaviour of v2.2 and trunk is that file
> no-match returns success. And yet you stuck to your guns, even though
> all the reasons that supported your original veto were now reversed. In
> the process, you are now arguing for inconsistent behaviour, that is
> confusing for the end user, and that violates the principle of least
> surprise.
In what universe does the suggestion that path wildcards must correspond
to at least one existing path diverge from the allowance that the path(s)
need not contain one existing file? Two separate issues, one veto.
I'm sorry you don't support my -1, but am done with your handwaving about
whether the the veto is valid, or not. It is, and your protestations don't
invalidate it.
>> No, you haven't; you have inflicted your desire of a new feature in
>> such a way
>> that the typical user will be confused, and would be disrupted by
>> their own
>> fat fingers in such a way as they would not be able to decipher the
>> reason for
>> this failure without re-reading and fully comprehending their
>> configuration
>> character-by-character, something I watch users fail at on a weekly
>> basis.
>
> The original patch was contributed to solve a significant amount of real
> actual pain for a large amount of real actual people caused by a hack
> that was put in place on one of the UK's largest web platforms, the
> solution being to remove the hack and to just do the job properly in the
> first place. I am sure all these people will be overjoyed to hear your
> solution to this problem is to just not make this capability available
> on v2.2.
Then they are welcome to use a patched version of httpd; this is the
advantage of open source. Anyone can use whatever code they like whether
they agree with the 'released' version, or not. There is a solution on
the table which could satisfy everyone, allowing a missing explicit file,
or file pattern, or directory pattern to match nothing - while making no
change in 2.2 to the Include behavior of allowing file patterns to not
match once the directory pattern has matched.
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS docs/manual/mod/core.xml server/config.c
Posted by Graham Leggett <mi...@sharp.fm>.
On 30 Mar 2010, at 1:18 AM, William A. Rowe Jr. wrote:
>> As it turns out that the optional behaviour is the current default
>> behaviour, and because you were not aware of this when you made your
>> suggestion above, it is necessary for the option to become
>> IncludeStrict
>> instead of IncludeOptional.
>
> The default behavior of -trunk-. Right now, nobody has voted that
> trunk is
> in an appropriate state for general availability. The default
> behavior of
> 2.2 is that only filename wildcards are allowed to not-match.
That's because directory wildcards aren't supported in v2.2 at all and
never were. You cannot claim that functionality that was never there
somehow affirms a particular behaviour one way or another.
The basic fact remains, you thought the default behaviour of the
server was that a file no-match returned an error, and I too thought
that until saturday, when I spent a whole lot of time trying to pick
apart what was going on to resolve your veto. In the light of your
original understanding, a veto made perfect sense - if a file no-match
returned failure, then directory no-match should too return failure,
to be consistent, non confusing for the end user, and to follow the
principle of least surprise.
Then it is uncovered that the default behaviour of the server was the
complete opposite: the default behaviour of v2.2 and trunk is that
file no-match returns success. And yet you stuck to your guns, even
though all the reasons that supported your original veto were now
reversed. In the process, you are now arguing for inconsistent
behaviour, that is confusing for the end user, and that violates the
principle of least surprise.
> No, you haven't; you have inflicted your desire of a new feature in
> such a way
> that the typical user will be confused, and would be disrupted by
> their own
> fat fingers in such a way as they would not be able to decipher the
> reason for
> this failure without re-reading and fully comprehending their
> configuration
> character-by-character, something I watch users fail at on a weekly
> basis.
The original patch was contributed to solve a significant amount of
real actual pain for a large amount of real actual people caused by a
hack that was put in place on one of the UK's largest web platforms,
the solution being to remove the hack and to just do the job properly
in the first place. I am sure all these people will be overjoyed to
hear your solution to this problem is to just not make this capability
available on v2.2.
Regards,
Graham
--
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/29/2010 5:59 PM, Graham Leggett wrote:
> On 30 Mar 2010, at 12:32 AM, William A. Rowe Jr. wrote:
>
>> You are persisting in looking at the code. The problem is not _code_.
>>
>> The _users_ do not expect Include /etc/htppd*/*.conf to succeed,
>> therefore
>> your suggested solution isn't acceptable. The veto for backporting this
>> broken behavior to 2.2 stands.
>
>
> Quoting your own mail:
>
> "If you believe the feature is necessary, introduce a NEW unambiguous
> feature
> instead of overloading. E.g. "IncludeOptional /optional/include" for
> allowing
> the include to fail."
>
> As it turns out that the optional behaviour is the current default
> behaviour, and because you were not aware of this when you made your
> suggestion above, it is necessary for the option to become IncludeStrict
> instead of IncludeOptional.
The default behavior of -trunk-. Right now, nobody has voted that trunk is
in an appropriate state for general availability. The default behavior of
2.2 is that only filename wildcards are allowed to not-match. And by adding
a new IncludeOptional or similarly named directive, experienced users would
be able to relax the requirements to directory names, while we would be able
to enforce the matching of even one filename for the less expert user.
>From a user perspective, this is a better design that would improve the next
httpd release from the 2.2 release, which is always a good thing. This would
enforce the principal of least surprise.
> Despite your veto being invalid for the reasons already stated, I have
> gone out of my way in good faith to implement your suggestion above and
> give end users the choice of behaviour you believe end users should
> have, in a form that can be backported to v2.2.
No, you haven't; you have inflicted your desire of a new feature in such a way
that the typical user will be confused, and would be disrupted by their own
fat fingers in such a way as they would not be able to decipher the reason for
this failure without re-reading and fully comprehending their configuration
character-by-character, something I watch users fail at on a weekly basis.
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS docs/manual/mod/core.xml server/config.c
Posted by Graham Leggett <mi...@sharp.fm>.
On 30 Mar 2010, at 12:32 AM, William A. Rowe Jr. wrote:
> You are persisting in looking at the code. The problem is not _code_.
>
> The _users_ do not expect Include /etc/htppd*/*.conf to succeed,
> therefore
> your suggested solution isn't acceptable. The veto for backporting
> this
> broken behavior to 2.2 stands.
Quoting your own mail:
"If you believe the feature is necessary, introduce a NEW unambiguous
feature
instead of overloading. E.g. "IncludeOptional /optional/include" for
allowing
the include to fail."
As it turns out that the optional behaviour is the current default
behaviour, and because you were not aware of this when you made your
suggestion above, it is necessary for the option to become
IncludeStrict instead of IncludeOptional.
Despite your veto being invalid for the reasons already stated, I have
gone out of my way in good faith to implement your suggestion above
and give end users the choice of behaviour you believe end users
should have, in a form that can be backported to v2.2.
Regards,
Graham
--
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/29/2010 5:12 PM, Graham Leggett wrote:
> On 29 Mar 2010, at 9:19 PM, William A. Rowe Jr. wrote:
>
>> On 3/29/2010 6:10 AM, Graham Leggett wrote:
>>>
>>> Exactly, behaviour entirely consistent with and unchanged from past
>>> behaviour, as shown above.
>>
>> No Graham, it's not.
>
> Is this the 5 minute argument or the full half hour?
>
> I've implemented your suggestion to introduce a dedicated directive,
> IncludeStrict gives you the behaviour you want, and has been carefully
> crafted to ensure it can be backported to v2.2 after review: r928916.
You are persisting in looking at the code. The problem is not _code_.
The _users_ do not expect Include /etc/htppd*/*.conf to succeed, therefore
your suggested solution isn't acceptable. The veto for backporting this
broken behavior to 2.2 stands.
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS docs/manual/mod/core.xml server/config.c
Posted by Graham Leggett <mi...@sharp.fm>.
On 29 Mar 2010, at 9:19 PM, William A. Rowe Jr. wrote:
> On 3/29/2010 6:10 AM, Graham Leggett wrote:
>>
>> Exactly, behaviour entirely consistent with and unchanged from past
>> behaviour, as shown above.
>
> No Graham, it's not.
Is this the 5 minute argument or the full half hour?
I've implemented your suggestion to introduce a dedicated directive,
IncludeStrict gives you the behaviour you want, and has been carefully
crafted to ensure it can be backported to v2.2 after review: r928916.
Regards,
Graham
--
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/29/2010 6:10 AM, Graham Leggett wrote:
>
> Exactly, behaviour entirely consistent with and unchanged from past
> behaviour, as shown above.
No Graham, it's not.
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS docs/manual/mod/core.xml server/config.c
Posted by Graham Leggett <mi...@sharp.fm>.
On 29 Mar 2010, at 2:39 AM, William A. Rowe Jr. wrote:
> Of course it does, look past the code. Look at the impact of this
> patch.
>
> Past;
>
> /etc/httpd.d/*.conf #works
/etc/httpd.d/*.cnof # succeeds, in spite of typo
> /etc/htppd.d/*.conf #errors out for typo
>
> New;
>
> /etc/httpd*/*.conf #works
> /etc/htppd*/*.conf #succeeds, in spite of typo
Exactly, behaviour entirely consistent with and unchanged from past
behaviour, as shown above.
> All it takes to make a bad path into a successful path is a wildcard.
> This is a demonstrable change in behavior, and is more arbitrary than
> the current configuration syntax.
>
> Working on patch to your commit 909878 that errors out when no files
> match
> whatsoever.
As you already suggested, if you want to change the behaviour of
Include, then use another directive for this, like IncludeStrict. I
have no objection at to us supporting both strict and non strict
behaviour at the same time, on condition we do it consistently.
Being arbitrarily strict in one wildcard element in a path, and then
non strict in another wildcard element in the same path makes no sense
at all, and that would not only genuinely confuse people, but create
configurations that work by accident as people would assume quite
sensibly that an accepted no-match on a wildcard file would mean an
accepted no-match on a wildcard directory.
Regards,
Graham
--
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/28/2010 7:00 PM, Graham Leggett wrote:
> On 28 Mar 2010, at 9:44 PM, William A. Rowe Jr. wrote:
>
>> Right, so something does vary between 2.2, and the patched behavior.
>> It introduces new mechanisms to introduce typos into a working config,
>> more complex typos that previously would have failed.
>
> The patch does no such thing - it moves the "fnmatch" loop that in the
> past considered files only to now consider directories as well as files.
Of course it does, look past the code. Look at the impact of this patch.
Past;
/etc/httpd.d/*.conf #works
/etc/htppd.d/*.conf #errors out for typo
New;
/etc/httpd*/*.conf #works
/etc/htppd*/*.conf #succeeds, in spite of typo
All it takes to make a bad path into a successful path is a wildcard.
This is a demonstrable change in behavior, and is more arbitrary than
the current configuration syntax.
Working on patch to your commit 909878 that errors out when no files match
whatsoever.
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS docs/manual/mod/core.xml server/config.c
Posted by Graham Leggett <mi...@sharp.fm>.
On 28 Mar 2010, at 9:44 PM, William A. Rowe Jr. wrote:
> Right, so something does vary between 2.2, and the patched behavior.
> It introduces new mechanisms to introduce typos into a working config,
> more complex typos that previously would have failed.
The patch does no such thing - it moves the "fnmatch" loop that in the
past considered files only to now consider directories as well as
files. The patch makes no attempt whatsoever to change the existing
behaviour of fnmatch at all, it respects the behaviour that is already
there. Nor should the patch have attempted to make any change in
behaviour: one patch, one change.
I strongly object to any difference in behaviour between directories
and files (as in, I would -1 it). If a files-no-match returns a
failure, then a directories-no-match must return a failure. If files-
no-match returns ignore, then directories-no-match should too return
ignore. To do otherwise would introduce genuine confusion about the
arbitrary inconsistency: pick one, or the other, not both.
Your technical justification you have provided is as follows:
"No-match of a wildcard must result in an error. If you are arguing
that httpd
should allow the admin to create conf/vhosts/*, only populated if they
are created,
then I'll counter that would be fine, just populate conf/vhosts/
empty.conf with no
lines, the error would go away, and supporting no-matches is never
necessary. This
must be true of both file and directory patterns to prevent users from
experiencing
unnecessary frustration over their own fat fingers."
Given that the risk you've given (unnecessary frustration over their
own fat fingers) exists right now and has for some time, and the fact
that nobody has complained of this risk to date[1], I argue that the
risk you've highlighted doesn't exist, and that therefore the
behaviour you want isn't justified. Trying to veto feature A because
it does not also introduce new-and-unrelated feature B is not a valid
justification for a veto. Argue for feature B on it's own merit, and
patch it separately if necessary.
[1] If this was a genuine problem, we would have been alerted to it,
and we would all have known that no-match is ignored.
Regards,
Graham
--
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/27/2010 9:37 AM, Graham Leggett wrote:
> On 21 Mar 2010, at 10:14 PM, William A. Rowe Jr. wrote:
>
>> The gist of my objection is this illegitimate behavior;
>>
>> Include conf/extra/*.duh
>>
>> Include conf/extra/*/doh.conf
>>
>> Include conf/empty/*
>>
>> Include conf/*/whoops.conf
>>
>> The last one (based on an existing conf/empty directive) fails,
>> alerting the admin
>> to the fact that they made a typo, which is good.
>>
>> The others all fail-to-fail with this logic [based on the absence of
>> any matching
>> directories in the extra/ folder]. That's unacceptable.
>
> I've just been trying to pick apart the original behaviour (pre patch),
> and as Dan has pointed out, this patch makes no change to the existing
> behaviour of v2.2 or trunk: options 1 and 3 both succeed in httpd
> v2.2.13 and v2.2.14 (which you are attempting to veto), and options 2
> and 4 fail as wildcards are not supported (as expected).
Right, so something does vary between 2.2, and the patched behavior.
It introduces new mechanisms to introduce typos into a working config,
more complex typos that previously would have failed.
> As a result, the change you want cannot be backported to v2.2 as it will
> break existing configurations, and the veto is therefore invalid. I
> suspect it has worked like this in the past, I have no idea when this
> behaviour was changed.
No; I accept that there are two patches; one to demand a file (for the next
release) which is actually a simple patch, and one to insist that at least
there is a hit on the directory parttern.
We've already seen one post from someone other than you or I, in agreement that;
Include /etc/httpd.conf
should fail if httpd.conf is an empty directory.
If this cannot happen, directories not be enforced, than my veto of the current
backport stands, and the feature will just have to wait for 2.next with all the
proper precautions against unintended configuration. Take your pick.
This is an enhancement, so if it can't be done responsibly, it should not be
done on this branch.
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS docs/manual/mod/core.xml server/config.c
Posted by Graham Leggett <mi...@sharp.fm>.
On 21 Mar 2010, at 10:14 PM, William A. Rowe Jr. wrote:
> The gist of my objection is this illegitimate behavior;
>
> Include conf/extra/*.duh
>
> Include conf/extra/*/doh.conf
>
> Include conf/empty/*
>
> Include conf/*/whoops.conf
>
> The last one (based on an existing conf/empty directive) fails,
> alerting the admin
> to the fact that they made a typo, which is good.
>
> The others all fail-to-fail with this logic [based on the absence of
> any matching
> directories in the extra/ folder]. That's unacceptable.
I've just been trying to pick apart the original behaviour (pre
patch), and as Dan has pointed out, this patch makes no change to the
existing behaviour of v2.2 or trunk: options 1 and 3 both succeed in
httpd v2.2.13 and v2.2.14 (which you are attempting to veto), and
options 2 and 4 fail as wildcards are not supported (as expected).
As a result, the change you want cannot be backported to v2.2 as it
will break existing configurations, and the veto is therefore invalid.
I suspect it has worked like this in the past, I have no idea when
this behaviour was changed.
Regards,
Graham
--
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/21/2010 2:55 PM, Graham Leggett wrote:
> On 21 Mar 2010, at 9:52 PM, William A. Rowe Jr. wrote:
>
>> It was reviewed and vetoed by wrowe [not the purpose, but the effect]
>> and that
>> veto of trunk was not addressed before proposing this patch; the backport
>> proposal was invalid so the results of the backport vote are equally
>> invalid.
>>
>> Please revert, today, or I'm happy to back it out the entire mess on
>> both trunk
>> and 2.2 myself tomorrow, until a sensible hack is proposed.
>>
>> This is the procedural thread. We'll take up the veto on the original
>> thread
>> you appear to have ignored.
>
> Can you point out the message in which you veto'ed this?
Scratch my comment for now, and my frustration. It appears my frustration should
be directed at Thunderbird because I know I drafted this message (and just discovered
thousands of duplicate drafts, but none of this particular message.)
The gist of my objection is this illegitimate behavior;
Include conf/extra/*.duh
Include conf/extra/*/doh.conf
Include conf/empty/*
Include conf/*/whoops.conf
The last one (based on an existing conf/empty directive) fails, alerting the admin
to the fact that they made a typo, which is good.
The others all fail-to-fail with this logic [based on the absence of any matching
directories in the extra/ folder]. That's unacceptable.
So take this as my first attempt at a -1, sorry I was snippy. Based on my missing
or unsent message please don't feel obligated to back it out, if you would rather
offer the fix to this inappropriate behavior and propose it for backport.
In summary, my veto's logic is;
No-match of a wildcard must result in an error. If you are arguing that httpd
should allow the admin to create conf/vhosts/*, only populated if they are created,
then I'll counter that would be fine, just populate conf/vhosts/empty.conf with no
lines, the error would go away, and supporting no-matches is never necessary. This
must be true of both file and directory patterns to prevent users from experiencing
unnecessary frustration over their own fat fingers.
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS docs/manual/mod/core.xml server/config.c
Posted by Graham Leggett <mi...@sharp.fm>.
On 21 Mar 2010, at 9:52 PM, William A. Rowe Jr. wrote:
> It was reviewed and vetoed by wrowe [not the purpose, but the
> effect] and that
> veto of trunk was not addressed before proposing this patch; the
> backport
> proposal was invalid so the results of the backport vote are equally
> invalid.
>
> Please revert, today, or I'm happy to back it out the entire mess on
> both trunk
> and 2.2 myself tomorrow, until a sensible hack is proposed.
>
> This is the procedural thread. We'll take up the veto on the
> original thread
> you appear to have ignored.
Can you point out the message in which you veto'ed this?
Regards,
Graham
--
Re: svn commit: r925858 - in /httpd/httpd/branches/2.2.x: CHANGES
STATUS docs/manual/mod/core.xml server/config.c
Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 3/21/2010 1:37 PM, minfrin@apache.org wrote:
> Author: minfrin
> Date: Sun Mar 21 18:36:59 2010
> New Revision: 925858
>
> URL: http://svn.apache.org/viewvc?rev=925858&view=rev
> Log:
> core: Support wildcards in both the directory and file components of
> the path specified by the Include directive.
> Submitted by: minfrin, poirier
> Reviewed by: minfrin, jim, poirier
It was reviewed and vetoed by wrowe [not the purpose, but the effect] and that
veto of trunk was not addressed before proposing this patch; the backport
proposal was invalid so the results of the backport vote are equally invalid.
Please revert, today, or I'm happy to back it out the entire mess on both trunk
and 2.2 myself tomorrow, until a sensible hack is proposed.
This is the procedural thread. We'll take up the veto on the original thread
you appear to have ignored.