Return-Path:
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.