]> git.pld-linux.org Git - packages/apache.git/blob - httpd-2.0.48-autoindex.patch
- new metux patch
[packages/apache.git] / httpd-2.0.48-autoindex.patch
1 --- httpd-2.0.48/modules/generators/mod_autoindex.c.autoindex
2 +++ httpd-2.0.48/modules/generators/mod_autoindex.c
3 @@ -1329,14 +1329,6 @@
4          return (NULL);
5      }
6  
7 -    if (rr->finfo.filetype == APR_DIR) {
8 -        /* ap_sub_req_lookup_dirent() adds '/' to end of any directory,
9 -         * but that messes up our attempt to find relevant
10 -         * AddDescription directives.
11 -         */
12 -        rr->filename[strlen(rr->filename) - 1] = '\0';
13 -    }
14 -
15      p = (struct ent *) apr_pcalloc(r->pool, sizeof(struct ent));
16      if (dirent->filetype == APR_DIR) {
17          p->name = apr_pstrcat(r->pool, dirent->name, "/", NULL);
18 @@ -1362,6 +1354,10 @@
19                  p->isdir = 1;
20              }
21              rr->filename = ap_make_dirstr_parent (rr->pool, rr->filename);
22 +
23 +            /* omit the trailing slash (1.3 compat) */
24 +            rr->filename[strlen(rr->filename) - 1] = '\0';
25 +
26              if (!(p->icon = find_icon(d, rr, 1))) {
27                  p->icon = find_default_icon(d, "^^DIRECTORY^^");
28              }
29 @@ -1650,8 +1646,9 @@
30          }
31  
32          if (autoindex_opts & TABLE_INDEXING) {
33 +            ap_rputs("<tr>", r);
34              if (!(autoindex_opts & SUPPRESS_ICON)) {
35 -                ap_rputs("<tr><td valign=\"top\">", r);
36 +                ap_rputs("<td valign=\"top\">", r);
37                  if (autoindex_opts & ICONS_ARE_LINKS) {
38                      ap_rvputs(r, "<a href=\"", anchor, "\">", NULL);
39                  }
This page took 0.120467 seconds and 3 git commands to generate.