httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@hyperreal.org
Subject cvs commit: apache-1.3/htdocs/manual/mod core.html
Date Fri, 01 Jan 1999 17:03:13 GMT
rse         99/01/01 09:03:13

  Modified:    src      CHANGES
               src/main http_config.c http_core.c
               htdocs/manual/mod core.html
  Log:
  Fix a few minor inconsistencies related to directive scoping
  ============================================================
  
  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 ;-)...
  
  Revision  Changes    Path
  1.1185    +5 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1184
  retrieving revision 1.1185
  diff -u -r1.1184 -r1.1185
  --- CHANGES	1998/12/31 15:54:17	1.1184
  +++ CHANGES	1999/01/01 17:03:09	1.1185
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3.4
   
  +  *) Fix some inconsistencies related to the scopes of directives. The only
  +     user visible change is that the directives `UseCanonicalName' and
  +     `ContentDigest' now use the (more correct) `Options' scope instead of
  +     (less correct) `AuthConfig' scope.  [Ralf S. Engelschall]
  +
     *) Using DSO, the Server token was being mangled. Specifically, the
        module's token was being added first before the Apache token. This
        has been fixed. [Jim Jagielski]
  
  
  
  1.139     +2 -2      apache-1.3/src/main/http_config.c
  
  Index: http_config.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_config.c,v
  retrieving revision 1.138
  retrieving revision 1.139
  diff -u -r1.138 -r1.139
  --- http_config.c	1998/12/28 12:30:28	1.138
  +++ http_config.c	1999/01/01 17:03:11	1.139
  @@ -1557,9 +1557,9 @@
   	 ((pc->req_override & (ACCESS_CONF | OR_AUTHCFG | OR_LIMIT)))))
   	printf("anywhere");
       else if (pc->req_override & RSRC_CONF)
  -	printf("only outside <Directory> or <Location>");
  +	printf("only outside <Directory>, <Files> or <Location>");
       else
  -	printf("only inside <Directory> or <Location>");
  +	printf("only inside <Directory>, <Files> or <Location>");
   
       /* Warn if the directive is allowed inside <Directory> or .htaccess
        * but module doesn't support per-dir configuration */
  
  
  
  1.242     +3 -3      apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.241
  retrieving revision 1.242
  diff -u -r1.241 -r1.242
  --- http_core.c	1998/11/20 21:17:28	1.241
  +++ http_core.c	1999/01/01 17:03:11	1.242
  @@ -2584,10 +2584,10 @@
     "Whether persistent connections should be On or Off" },
   { "IdentityCheck", set_idcheck, NULL, RSRC_CONF|ACCESS_CONF, FLAG,
     "Enable identd (RFC 1413) user lookups - SLOW" },
  -{ "ContentDigest", set_content_md5, NULL, RSRC_CONF|ACCESS_CONF|OR_AUTHCFG,
  +{ "ContentDigest", set_content_md5, NULL, OR_OPTIONS,
     FLAG, "whether or not to send a Content-MD5 header with each request" },
   { "UseCanonicalName", set_use_canonical_name, NULL,
  -  RSRC_CONF|ACCESS_CONF|OR_AUTHCFG, FLAG,
  +  OR_OPTIONS, FLAG,
     "Whether or not to always use the canonical ServerName : Port when "
     "constructing URLs" },
   { "StartServers", set_daemons_to_start, NULL, RSRC_CONF, TAKE1,
  @@ -2664,7 +2664,7 @@
     "Limit (0 = unlimited) on max number of header fields in a request message"},
   { "LimitRequestBody", set_limit_req_body,
     (void*)XtOffsetOf(core_dir_config, limit_req_body),
  -  RSRC_CONF|ACCESS_CONF|OR_ALL, TAKE1,
  +  OR_ALL, TAKE1,
     "Limit (in bytes) on maximum size of request message body" },
   { NULL },
   };
  
  
  
  1.142     +2 -2      apache-1.3/htdocs/manual/mod/core.html
  
  Index: core.html
  ===================================================================
  RCS file: /home/cvs/apache-1.3/htdocs/manual/mod/core.html,v
  retrieving revision 1.141
  retrieving revision 1.142
  diff -u -r1.141 -r1.142
  --- core.html	1998/11/23 15:21:18	1.141
  +++ core.html	1999/01/01 17:03:12	1.142
  @@ -445,7 +445,7 @@
   <A
    HREF="directive-dict.html#Override"
    REL="Help"
  -><STRONG>Override:</STRONG></A> AuthConfig<BR>
  +><STRONG>Override:</STRONG></A> Options<BR>
   <A
    HREF="directive-dict.html#Status"
    REL="Help"
  @@ -3006,7 +3006,7 @@
   <STRONG>Context:</STRONG></A> server config, virtual host, directory,
.htaccess
   <BR>
   <A HREF="directive-dict.html#Override" REL="Help">
  -<STRONG>Override:</STRONG></A> AuthConfig<BR>
  +<STRONG>Override:</STRONG></A> Options<BR>
   <A HREF="directive-dict.html#Compatibility" REL="Help">
   <STRONG>Compatibility:</STRONG></A> UseCanonicalName is only available
in
   Apache 1.3 and later<P>
  
  
  

Mime
View raw message