httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1204356 - in /httpd/httpd/trunk: docs/manual/mod/mod_autoindex.html.en docs/manual/mod/mod_autoindex.xml docs/manual/upgrading.html.en docs/manual/upgrading.xml modules/generators/mod_autoindex.c
Date Mon, 21 Nov 2011 05:12:13 GMT
Author: covener
Date: Mon Nov 21 05:12:12 2011
New Revision: 1204356

URL: http://svn.apache.org/viewvc?rev=1204356&view=rev
Log:
roll back pair of recent autoindex changes (1204355:1204306)

Modified:
    httpd/httpd/trunk/docs/manual/mod/mod_autoindex.html.en
    httpd/httpd/trunk/docs/manual/mod/mod_autoindex.xml
    httpd/httpd/trunk/docs/manual/upgrading.html.en
    httpd/httpd/trunk/docs/manual/upgrading.xml
    httpd/httpd/trunk/modules/generators/mod_autoindex.c

Modified: httpd/httpd/trunk/docs/manual/mod/mod_autoindex.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_autoindex.html.en?rev=1204356&r1=1204355&r2=1204356&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_autoindex.html.en (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_autoindex.html.en Mon Nov 21 05:12:12 2011
@@ -323,10 +323,6 @@ icon selected by MIME content-type</td><
       element (such as cutting off the end of a bolded phrase), the
       results may affect the rest of the directory listing.</p>
     </div>
-    <div class="note"><h3>Compatibility</h3>
-    <p> Prior to version 2.4, any wild-card expression that contained slashes 
-    was treated as if it started with a '*'.</p>
-    </div>
 
 </div>
 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif"
/></a></div>

Modified: httpd/httpd/trunk/docs/manual/mod/mod_autoindex.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_autoindex.xml?rev=1204356&r1=1204355&r2=1204356&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_autoindex.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_autoindex.xml Mon Nov 21 05:12:12 2011
@@ -314,10 +314,6 @@ icon selected by MIME content-type</desc
       element (such as cutting off the end of a bolded phrase), the
       results may affect the rest of the directory listing.</p>
     </note>
-    <note><title>Compatibility</title>
-    <p> Prior to version 2.4, any wild-card expression that contained slashes 
-    was treated as if it started with a '*'.</p>
-    </note>
 </usage>
 </directivesynopsis>
 

Modified: httpd/httpd/trunk/docs/manual/upgrading.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/upgrading.html.en?rev=1204356&r1=1204355&r2=1204356&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/upgrading.html.en (original)
+++ httpd/httpd/trunk/docs/manual/upgrading.html.en Mon Nov 21 05:12:12 2011
@@ -275,10 +275,6 @@
       display descriptions for .xhtml files, which were previously
       ignored.</li>
 
-      <li><code class="module"><a href="./mod/mod_autoindex.html">mod_autoindex</a></code>:
AddDescription 'file' arguments
-      that contain wild-cards and slashes are no longer implicitly treated 
-      as if they began with a '*' character.</li>
-
       <li><code class="module"><a href="./mod/mod_ssl.html">mod_ssl</a></code>:
The default format of the <code>*_DN</code>
       variables has changed. The old format can still be used with the new
       <code>LegacyDNStringFormat</code> argument to <code class="directive"><a
href="./mod/mod_ssl.html#ssloptions">SSLOptions</a></code>. The SSLv2 protocol
is

Modified: httpd/httpd/trunk/docs/manual/upgrading.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/upgrading.xml?rev=1204356&r1=1204355&r2=1204356&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/upgrading.xml (original)
+++ httpd/httpd/trunk/docs/manual/upgrading.xml Mon Nov 21 05:12:12 2011
@@ -291,10 +291,6 @@
       display descriptions for .xhtml files, which were previously
       ignored.</li>
 
-      <li><module>mod_autoindex</module>: AddDescription 'file' arguments
-      that contain wild-cards and slashes are no longer implicitly treated 
-      as if they began with a '*' character.</li>
-
       <li><module>mod_ssl</module>: The default format of the <code>*_DN</code>
       variables has changed. The old format can still be used with the new
       <code>LegacyDNStringFormat</code> argument to <directive

Modified: httpd/httpd/trunk/modules/generators/mod_autoindex.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_autoindex.c?rev=1204356&r1=1204355&r2=1204356&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_autoindex.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_autoindex.c Mon Nov 21 05:12:12 2011
@@ -300,7 +300,6 @@ static const char *add_desc(cmd_parms *c
     autoindex_config_rec *dcfg = (autoindex_config_rec *) d;
     ai_desc_t *desc_entry;
     char *prefix = "";
-    int is_abspath = ap_os_is_path_absolute(cmd->temp_pool, to);
 
     desc_entry = (ai_desc_t *) apr_array_push(dcfg->desc_list);
     desc_entry->full_path = (ap_strchr_c(to, '/') == NULL) ? 0 : 1;
@@ -308,12 +307,7 @@ static const char *add_desc(cmd_parms *c
                              || desc_entry->full_path
                              || apr_fnmatch_test(to));
     if (desc_entry->wildcards) {
-        if (desc_entry->full_path && !is_abspath) { 
-            prefix = "*/";
-        }
-        else if (WILDCARDS_REQUIRED) { 
-            prefix = "*";
-        }
+        prefix = desc_entry->full_path ? "*/" : "*";
         desc_entry->pattern = apr_pstrcat(dcfg->desc_list->pool,
                                           prefix, to, "*", NULL);
     }
@@ -326,7 +320,7 @@ static const char *add_desc(cmd_parms *c
 
 static const char *add_ignore(cmd_parms *cmd, void *d, const char *ext)
 {
-    push_item(((autoindex_config_rec *) d)->ign_list, cmd->info, ext, cmd->path,
NULL);
+    push_item(((autoindex_config_rec *) d)->ign_list, 0, ext, cmd->path, NULL);
     return NULL;
 }
 
@@ -587,7 +581,7 @@ static const command_rec autoindex_cmds[
                       "one or more index options [+|-][]"),
     AP_INIT_TAKE2("IndexOrderDefault", set_default_order, NULL, DIR_CMD_PERMS,
                   "{Ascending,Descending} {Name,Size,Description,Date}"),
-    AP_INIT_ITERATE("IndexIgnore", add_ignore, BY_PATH, DIR_CMD_PERMS,
+    AP_INIT_ITERATE("IndexIgnore", add_ignore, NULL, DIR_CMD_PERMS,
                     "one or more file extensions"),
     AP_INIT_FLAG("IndexIgnoreReset", ap_set_flag_slot,
                  (void *)APR_OFFSETOF(autoindex_config_rec, ign_noinherit),
@@ -876,13 +870,30 @@ static int ignore_entry(autoindex_config
 {
     apr_array_header_t *list = d->ign_list;
     struct item *items = (struct item *) list->elts;
+    char *tt;
     int i;
 
+    if ((tt = strrchr(path, '/')) == NULL) {
+        tt = path;
+    }
+    else {
+        tt++;
+    }
+
     for (i = 0; i < list->nelts; ++i) {
         struct item *p = &items[i];
+        char *ap;
+
+        if ((ap = strrchr(p->apply_to, '/')) == NULL) {
+            ap = p->apply_to;
+        }
+        else {
+            ap++;
+        }
 
 #ifndef CASE_BLIND_FILESYSTEM
-        if (!ap_strcmp_match(path, p->apply_to)) {
+        if (!ap_strcmp_match(path, p->apply_path)
+            && !ap_strcmp_match(tt, ap)) {
             return 1;
         }
 #else  /* !CASE_BLIND_FILESYSTEM */
@@ -891,7 +902,8 @@ static int ignore_entry(autoindex_config
          * a factor of the filesystem involved, but we can't detect that
          * reliably - so we have to granularise at the OS level.
          */
-        if (!ap_strcasecmp_match(path, p->apply_to)) {
+        if (!ap_strcasecmp_match(path, p->apply_path)
+            && !ap_strcasecmp_match(tt, ap)) {
             return 1;
         }
 #endif /* !CASE_BLIND_FILESYSTEM */



Mime
View raw message