============================================================
1. httpd -h
Under "httpd -h" one gets a nice English description in which scope a
directive can occur. But we talk here only about <Directory> and <Location>,
although <Files> is treated the same (also with `cmd->override ==
ACCESS_CONF|OR_ALL'). So I think it's correct to also list <Files>, too.
2. Used scope variants
Currently we have 203 directives and they use the following scopes (the
numbers in parenthesis gives the number of directives using a particular
scope):
RSRC_CONF (106)
RSRC_CONF|ACCESS_CONF (5)
RSRC_CONF|ACCESS_CONF|OR_ALL (1) <--
RSRC_CONF|ACCESS_CONF|OR_AUTHCFG (2) <--
ACCESS_CONF (5)
OR_AUTHCFG (20)
OR_LIMIT (3)
OR_OPTIONS (4)
OR_FILEINFO (21)
OR_INDEXES (23)
OR_ALL (13)
This is well spreaded and sounds reasonable. Except for
the two classes:
RSRC_CONF|ACCESS_CONF|OR_ALL (1)
RSRC_CONF|ACCESS_CONF|OR_AUTHCFG (2)
The first one is just a syntax overkill. It means only OR_ALL, because OR_ALL
includes (implicitly) already RSRC_CONF and ACCESS_CONF. So, when we fix
this to OR_ALL we get:
RSRC_CONF (106)
RSRC_CONF|ACCESS_CONF (5)
RSRC_CONF|ACCESS_CONF|OR_AUTHCFG (2) <--
ACCESS_CONF (5)
OR_AUTHCFG (20)
OR_LIMIT (3)
OR_OPTIONS (4)
OR_FILEINFO (21)
OR_INDEXES (23)
OR_ALL (14)
The remaining RSRC_CONF|ACCESS_CONF|OR_AUTHCFG is used by two directives:
UseCanonicalName and ContentDigest. Two not too old directives which were
added mostly at the same time. They're are implemented the same way.
But the scope looks incorrect. Why?
First, it's again syntax overkill, ok. We can reduce it to
RSRC_CONF|OR_AUTHCFG. But when we compare it to all other used scopes, it
looks very inconsistent. No other of the 203 directives want to be applicable
in such a non-orthoginal scope: on the first hand inside the AuthConfig scope
(which means .htaccess under "AllowOverride AuthConfig" plus _INSIDE_ of
<Directory>/<Location>/<Files> sections in httpd.conf only) and on the other
hand also in RSRC_CONF (which means _OUTSIDE_ of
<Directory>/<Location>/<Files> sections in httpd.conf only). Sure, finally
it's everywhere in httpd.conf plus .htaccess under AuthConfig scope. But it's
not intuitive: Directives which want to be applicable in such a total scope
use OR_OPTIONS, OR_FILEINFO or OR_INDEXES. And when we think about
UseCanonicalName and ContentDigest we find out that they belongs more to
Options, XBitHack and CheckSpelling than to any AuthXXXX directives.
So, I propose to change the scope of those two directives to OR_OPTIONS. It
makes no big difference, of course. It still is useable everwhere inside
httpd.conf, but inside .htaccess now under Options instead of AuthConfig. And
it both belongs to the more correct group of directives and makes our list of
used scopes more consistent.
With the above patch be get this consistent scope-list:
RSRC_CONF (106)
RSRC_CONF|ACCESS_CONF (5)
ACCESS_CONF (5)
OR_AUTHCFG (20)
OR_LIMIT (3)
OR_OPTIONS (6)
OR_FILEINFO (21)
OR_INDEXES (23)
OR_ALL (14)
When we take into account that _theoretically_ there are a lot more variants
of these or'ed values are possible, this list is _VERY_ clean. Actually it's
the most clean variant I can think of (except for the fact that the whole
mechanism is a horrible mess ;-)...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@82558 13f79535-47bb-0310-9956-ffa450edef68
Submitted by: Ralf Engelschall
Reviewed by: Brian Behlendorf
*) Add <IfDefine>..</IfDefine> sections to the core module (with same spirit
as <IfModule>..</IfModule> sections) which can be used to skip or process
contained commands dependend of ``-D PARAMETER'' options on the command
line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@81563 13f79535-47bb-0310-9956-ffa450edef68
HostnameLookups were *not* allowed in .htaccess files. They should
be, but for now it doesn't. This can't be as easy as changing
ACCESS_CONF|RSRC_CONF to OR_FILEINFO or something, is it?
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@81470 13f79535-47bb-0310-9956-ffa450edef68
Obtained from:
Submitted by: Jim Jagielski
Reviewed by:
Replace the AddVersionPlatform directive with ServerTokens directive
which allow for either Minimal ("Apache/1.3.0"), OS ("Apache/1.3.0 (UNIX)")
or Full ("Apache/1.3.0 (UNIX) PHP/3.0") type Server headers.
SERVER_SUBVERSION is no longer supported.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@81244 13f79535-47bb-0310-9956-ffa450edef68
Brian Havard, and Marc think that's better - and if Marc, who is
so security-conscious, thinks it's a good idea that tips me over
to that side as well.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@81193 13f79535-47bb-0310-9956-ffa450edef68
which make the SERVER_SUBVERSION functionality a runtime thing and
allow adding OS identity to the Server-Version string respectively.
PR: 2056
Reviewed by: Jim Jagielski, Martin Kraemer, Brian Behlendorf
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@81175 13f79535-47bb-0310-9956-ffa450edef68
with AliasMatch and RewriteRule. This was discussed in nh.9711, search
for subject "mod_rewrite/1440". My proposed change had the support of
Roy, Ken and Dirk... I modified it slightly here so that it wouldn't
break every single existing config that has <Location /server-status>.
PR: 1440
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@80426 13f79535-47bb-0310-9956-ffa450edef68
error messages generated. Introduced cmd->end_token to make it easier
to do nested sections with proper error reporting. (Note that it can't
be used for <IfModule> or <Limit> unfortunately.)
PR#379: <Files> is not allowed within <Location> because it has no effect.
PR#1817: Change <Files> to work with basenames only. This fixes both
the bug introduced by the wildcarding change (* doesn't match /) and
bugs such as <Files a*b> not working.
PR: 379, 1817
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@80233 13f79535-47bb-0310-9956-ffa450edef68
redirects are generated. This was at least approved in spirit by a
handful of folks two weeks ago. The default should be no behaviour
change.
This changes the prototype of construct_url(), and adds two new
API functions: get_server_name() and get_server_port(). So the
MODULE_MAGIC_NUMBER has been bumped.
PR: 315, 459, 485, 1433
Submitted by: Michael Douglass <mikedoug@texas.net>, Dean Gaudet
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@80076 13f79535-47bb-0310-9956-ffa450edef68