1 diff -urNp -x '*.orig' apache_1.3.42.org/src/modules/standard/mod_autoindex.c apache_1.3.42/src/modules/standard/mod_autoindex.c
2 --- apache_1.3.42.org/src/modules/standard/mod_autoindex.c 2023-02-02 22:43:12.489834914 +0100
3 +++ apache_1.3.42/src/modules/standard/mod_autoindex.c 2023-02-02 22:43:12.716501580 +0100
4 @@ -59,6 +59,7 @@ module MODULE_VAR_EXPORT autoindex_modul
5 #define TRACK_MODIFIED 1024
6 #define SORT_NOCASE 2048
7 #define STUDLY_INDEXING 4096
8 +#define INDEXOPT_INDEXES 8192
12 @@ -421,6 +422,9 @@ static const char *add_opts(cmd_parms *c
13 else if (!strcasecmp(w, "IgnoreCase")) {
16 + else if (!strcasecmp(w, "Indexes")) {
17 + option = INDEXOPT_INDEXES;
19 else if (!strcasecmp(w, "None")) {
21 return "Cannot combine '+' or '-' with 'None' keyword";
22 @@ -1970,7 +1974,7 @@ static int index_directory(request_rec *
23 static int handle_autoindex(request_rec *r)
25 autoindex_config_rec *d;
26 - int allow_opts = ap_allow_options(r);
27 + int opt_indexes = ap_allow_options(r) & OPT_INDEXES;
29 d = (autoindex_config_rec *) ap_get_module_config(r->per_dir_config,
31 @@ -1981,8 +1985,12 @@ static int handle_autoindex(request_rec
34 /* OK, nothing easy. Trot out the heavy artillery... */
35 + if ((d->incremented_opts & INDEXOPT_INDEXES) ||
36 + (d->opts & INDEXOPT_INDEXES)) opt_indexes = 1;
37 + if ((d->decremented_opts & INDEXOPT_INDEXES) &&
38 + !(d->opts & INDEXOPT_INDEXES)) opt_indexes = 0;
40 - if (allow_opts & OPT_INDEXES) {
42 /* KLUDGE --- make the sub_req lookups happen in the right directory.
43 * Fixing this in the sub_req_lookup functions themselves is difficult,
44 * and would probably break virtual includes...