Return-Path: Delivered-To: apache-cvs-archive@hyperreal.org Received: (qmail 7019 invoked by uid 6000); 2 Oct 1998 21:35:45 -0000 Received: (qmail 6999 invoked by alias); 2 Oct 1998 21:35:43 -0000 Delivered-To: apache-1.3-cvs@hyperreal.org Received: (qmail 6966 invoked by uid 161); 2 Oct 1998 21:35:42 -0000 Date: 2 Oct 1998 21:35:42 -0000 Message-ID: <19981002213542.6965.qmail@hyperreal.org> From: coar@hyperreal.org To: apache-1.3-cvs@hyperreal.org Subject: cvs commit: apache-1.3/src/modules/standard mod_autoindex.c Sender: apache-cvs-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org coar 98/10/02 14:35:40 Modified: htdocs/manual/mod mod_autoindex.html src/modules/standard mod_autoindex.c Log: Back off a portion of the incremental-IndexOptions patch; unprefixed keywords should clear all inherited options and start setting the local directory's options from scratch. Otherwise, 'keyword' and '+keyword' are essentially identical, and clearing inheritance a pain. Revision Changes Path 1.26 +4 -8 apache-1.3/htdocs/manual/mod/mod_autoindex.html Index: mod_autoindex.html =================================================================== RCS file: /export/home/cvs/apache-1.3/htdocs/manual/mod/mod_autoindex.html,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- mod_autoindex.html 1998/09/28 22:32:10 1.25 +++ mod_autoindex.html 1998/10/02 21:35:33 1.26 @@ -637,8 +637,8 @@ Whenever a '+' or '-' prefixed keyword is encountered, it is applied to the current IndexOptions settings (which may have been inherited from an upper-level directory). However, whenever an unprefixed -keyword is processed, it clears all incremental settings. Consider -the following example: +keyword is processed, it clears all inherited options and any incremental +settings encountered so far. Consider the following example:

IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
@@ -654,13 +654,9 @@

To unconditionally set the IndexOptions for a -particular directory, clearing the inherited settings, use +particular directory, clearing the inherited settings, specify +keywords without either '+' or '-' prefixes.

-
-IndexOptions None -
-IndexOptions new-setting ... -

1.95 +24 -9 apache-1.3/src/modules/standard/mod_autoindex.c Index: mod_autoindex.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_autoindex.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -r1.94 -r1.95 --- mod_autoindex.c 1998/09/28 22:32:12 1.94 +++ mod_autoindex.c 1998/10/02 21:35:38 1.95 @@ -512,23 +512,38 @@ if (add->opts & NO_OPTIONS) { /* * If the current directory says 'no options' then we also - * clear any incremental mods from being inheritable. + * clear any incremental mods from being inheritable further down. */ new->opts = NO_OPTIONS; new->incremented_opts = 0; new->decremented_opts = 0; } else { - new->incremented_opts = (base->incremented_opts - | add->incremented_opts) - & ~add->decremented_opts; - new->decremented_opts = (base->decremented_opts - | add->decremented_opts); /* - * We've got some local settings, so make sure we don't inadvertently - * inherit an IndexOptions None from above. + * If there were any non-incremental options selected for + * this directory, they dominate and we don't inherit *anything.* + * Contrariwise, we *do* inherit if the only settings here are + * incremental ones. */ - new->opts = ((base->opts | add->opts) & ~NO_OPTIONS); + if (add->opts == 0) { + new->incremented_opts = (base->incremented_opts + | add->incremented_opts) + & ~add->decremented_opts; + new->decremented_opts = (base->decremented_opts + | add->decremented_opts); + /* + * We may have incremental settings, so make sure we don't + * inadvertently inherit an IndexOptions None from above. + */ + new->opts = (base->opts & ~NO_OPTIONS); + } + else { + /* + * There are local non-incremental settings, which clear + * all inheritance from above. They *are* the new base settings. + */ + new->opts = add->opts;; + } /* * We're guaranteed that there'll be no overlap between * the add-options and the remove-options.