]> git.pld-linux.org Git - packages/apache1.git/blob - apache1-autoindex_indexes.patch
rel 15; builds
[packages/apache1.git] / apache1-autoindex_indexes.patch
1 --- build-tree-apache/apache_1.3.34/src/modules/standard/mod_autoindex.c        Wed Mar 13 22:05:33 2002
2 +++ build-tree-apache/apache_1.3.34/src/modules/standard/mod_autoindex.c        Wed Apr 24 17:17:05 2002
3 @@ -101,6 +101,7 @@
4  #define TRACK_MODIFIED 1024
5  #define SORT_NOCASE 2048
6  #define STUDLY_INDEXING 4096
7 +#define INDEXOPT_INDEXES 8192
8  
9  #define K_PAD 1
10  #define K_NOPAD 0
11 @@ -463,6 +464,9 @@
12         else if (!strcasecmp(w, "IgnoreCase")) {
13                 option = SORT_NOCASE;
14         }
15 +       else if (!strcasecmp(w, "Indexes")) {
16 +            option = INDEXOPT_INDEXES;
17 +       }
18         else if (!strcasecmp(w, "None")) {
19             if (action != '\0') {
20                 return "Cannot combine '+' or '-' with 'None' keyword";
21 @@ -2012,7 +2016,7 @@
22  static int handle_autoindex(request_rec *r)
23  {
24      autoindex_config_rec *d;
25 -    int allow_opts = ap_allow_options(r);
26 +    int opt_indexes = ap_allow_options(r) & OPT_INDEXES;
27  
28      d = (autoindex_config_rec *) ap_get_module_config(r->per_dir_config,
29                                                       &autoindex_module);
30 @@ -2023,8 +2027,12 @@
31      }
32  
33      /* OK, nothing easy.  Trot out the heavy artillery... */
34 +    if ((d->incremented_opts & INDEXOPT_INDEXES) ||
35 +       (d->opts & INDEXOPT_INDEXES)) opt_indexes = 1;
36 +    if ((d->decremented_opts & INDEXOPT_INDEXES) &&
37 +       !(d->opts & INDEXOPT_INDEXES)) opt_indexes = 0;
38  
39 -    if (allow_opts & OPT_INDEXES) {
40 +    if (opt_indexes) {
41         /* KLUDGE --- make the sub_req lookups happen in the right directory.
42          * Fixing this in the sub_req_lookup functions themselves is difficult,
43          * and would probably break virtual includes...
This page took 0.059604 seconds and 3 git commands to generate.