Commit d1b69730 authored by Ken Coar's avatar Ken Coar
Browse files

	There appear to be no dissenters (other than for brand-new and
	incompatible syntaxes) after three days, and I want to get this
	in for 1.3.3.  It can always be modified or reverted later.

	Add +/- prefixes to IndexOptions keywords, allow merging of
	multiple occurrences, and document the changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@82175 13f79535-47bb-0310-9956-ffa450edef68
parent 6abd4f87
Loading
Loading
Loading
Loading
+78 −4
Original line number Diff line number Diff line
@@ -470,7 +470,16 @@ IndexIgnore README .htaccess *~
<A
 HREF="directive-dict.html#Syntax"
 REL="Help"
><STRONG>Syntax:</STRONG></A> IndexOptions <EM>option option ...</EM><BR>
><STRONG>Syntax:</STRONG></A> IndexOptions <EM>option option ...</EM>
 (Apache 1.3.2 and earlier)
<BR>
<A
 HREF="directive-dict.html#Syntax"
 REL="Help"
><STRONG>Syntax:</STRONG></A> IndexOptions <EM>[+|-]option [+|-]option
 ...</EM>
 (Apache 1.3.3 and later)
<BR>
<A
 HREF="directive-dict.html#Context"
 REL="Help"
@@ -487,7 +496,15 @@ IndexIgnore README .htaccess *~
<A
 HREF="directive-dict.html#Module"
 REL="Help"
><STRONG>Module:</STRONG></A> mod_autoindex<P>
><STRONG>Module:</STRONG></A> mod_autoindex
<BR>
<A
 HREF="directive-dict.html#Compatibility"
 REL="Help"
><STRONG>Compatibility:</STRONG></A> '+/-' syntax and merging of multiple
 <SAMP>IndexOptions</SAMP> directives is only available with
 Apache 1.3.3 and later
<P>

The IndexOptions directive specifies the behavior of the directory indexing.
<EM>Option</EM> can be one of
@@ -577,7 +594,15 @@ indexing listings.
<!--%plaintext &lt;?INDEX {\tt SuppressSize} index option&gt; -->
This will suppress the file size in fancy indexing listings.
</DL>
This default is that no options are enabled. If multiple IndexOptions
<P>
There are some noticeable differences in the behaviour of this
directive in recent (post-1.3.0) versions of Apache.
</P>
<DL>
<DT>Apache 1.3.2 and earlier:</DT>
<DD>
<P>
The default is that no options are enabled. If multiple IndexOptions
could apply to a directory, then the most specific one is taken complete;
the options are not merged. For example:
<BLOCKQUOTE><CODE>
@@ -589,7 +614,56 @@ IndexOptions ScanHTMLTitles <BR>
&lt;/Directory&gt;
</CODE></BLOCKQUOTE>
then only <CODE>ScanHTMLTitles</CODE> will be set for the /web/docs/spec
directory.<P><HR>
directory.
</P>
</DD>
<DT>Apache 1.3.3 and later:</DT>
<DD>
<P>
Apache 1.3.3 introduced some significant changes in the handling of
<SAMP>IndexOptions</SAMP> directives.  In particular,
</P>
<UL>
 <LI>Multiple <SAMP>IndexOptions</SAMP> directives for a single
  directory are now merged together.  The result of the example above
  will now be the equivalent of
  <CODE>IndexOptions&nbsp;FancyIndexing&nbsp;ScanHTMLTitles</CODE>.
 </LI>
 <LI>The addition of the incremental syntax (<EM>i.e.</EM>, prefixing
  keywords with '+' or '-').
 </LI>
</UL>
<P>
Whenever a '+' or '-' prefixed keyword is encountered, it is applied
to the current <SAMP>IndexOptions</SAMP> 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:
</P>
<BLOCKQUOTE><CODE>IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
<BR>
IndexOptions +SuppressSize
<BR>
</CODE></BLOCKQUOTE>
<P>
The net effect is equivalent to
<CODE>IndexOptions&nbsp;FancyIndexing&nbsp;+SuppressSize</CODE>, because
the unprefixed <CODE>FancyIndexing</CODE> discarded the incremental
keywords before it, but allowed them to start accumulating again
afterward.
</P>
<P>
To unconditionally set the <CODE>IndexOptions</CODE> for a
particular directory, clearing the inherited settings, use
</P>
<BLOCKQUOTE><CODE>
IndexOptions None
<BR>
IndexOptions <EM>new-setting</EM> ...
</CODE></BLOCKQUOTE>
</DD>
</DL>
<HR>

<H2><A NAME="readmename">ReadmeName</A></H2>
<!--%plaintext &lt;?INDEX {\tt ReadmeName} directive&gt; -->