You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2011/02/10 16:24:21 UTC

svn commit: r1069424 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/generators/mod_autoindex.c

Author: jim
Date: Thu Feb 10 15:24:20 2011
New Revision: 1069424

URL: http://svn.apache.org/viewvc?rev=1069424&view=rev
Log:
PR47766

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/generators/mod_autoindex.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=1069424&r1=1069423&r2=1069424&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Thu Feb 10 15:24:20 2011
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.18
 
+  *) mod_autoindex: Merge IndexOptions from server to directory context when
+     the directory has no mod_autoindex directives. PR 47766. [Eric Covener]
+
   *) mod_cache: Make sure that we never allow a 304 Not Modified response
      that we asked for to leak to the client should the 304 response be
      uncacheable. PR45341 [Graham Leggett]

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=1069424&r1=1069423&r2=1069424&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Thu Feb 10 15:24:20 2011
@@ -90,12 +90,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * autoindex: fix merge of IndexOptions into per-dir configs 
-     without any autoindex options.  PR47766
-     Trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1031430
-     2.2.x patch: http://people.apache.org/~covener/patches/2.2.x-autoindex_merge.diff
-     +1 covener, rpluem, jim
-
   * mod_ssl: Correctly read full lines in input filter when the line is
     incomplete during first read. PR 50481.
       Trunk version of patch:

Modified: httpd/httpd/branches/2.2.x/modules/generators/mod_autoindex.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/generators/mod_autoindex.c?rev=1069424&r1=1069423&r2=1069424&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/generators/mod_autoindex.c (original)
+++ httpd/httpd/branches/2.2.x/modules/generators/mod_autoindex.c Thu Feb 10 15:24:20 2011
@@ -71,6 +71,7 @@ module AP_MODULE_DECLARE_DATA autoindex_
 #define IGNORE_CASE         (1 << 16)
 #define EMIT_XHTML          (1 << 17)
 #define SHOW_FORBIDDEN      (1 << 18)
+#define OPTION_UNSET        (1 << 19)
 
 #define K_NOADJUST 0
 #define K_ADJUST 1
@@ -621,7 +622,7 @@ static void *create_autoindex_config(apr
     new->ign_list = apr_array_make(p, 4, sizeof(struct item));
     new->hdr_list = apr_array_make(p, 4, sizeof(struct item));
     new->rdme_list = apr_array_make(p, 4, sizeof(struct item));
-    new->opts = 0;
+    new->opts = OPTION_UNSET;
     new->incremented_opts = 0;
     new->decremented_opts = 0;
     new->default_keyid = '\0';
@@ -655,9 +656,9 @@ static void *merge_autoindex_configs(apr
     new->desc_list = apr_array_append(p, add->desc_list, base->desc_list);
     new->icon_list = apr_array_append(p, add->icon_list, base->icon_list);
     new->rdme_list = apr_array_append(p, add->rdme_list, base->rdme_list);
-    if (add->opts & NO_OPTIONS) {
+    if (add->opts == NO_OPTIONS) {
         /*
-         * If the current directory says 'no options' then we also
+         * If the current directory explicitly says 'no options' then we also
          * clear any incremental mods from being inheritable further down.
          */
         new->opts = NO_OPTIONS;
@@ -671,7 +672,7 @@ static void *merge_autoindex_configs(apr
          * Contrariwise, we *do* inherit if the only settings here are
          * incremental ones.
          */
-        if (add->opts == 0) {
+        if (add->opts == OPTION_UNSET) {
             new->incremented_opts = (base->incremented_opts
                                      | add->incremented_opts)
                                     & ~add->decremented_opts;