]> git.pld-linux.org Git - packages/apache1.git/blame - apache1-autoindex_indexes.patch
rel 15; builds
[packages/apache1.git] / apache1-autoindex_indexes.patch
CommitLineData
35b2c95a
AM
1diff -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
bfc879b9
ER
5 #define TRACK_MODIFIED 1024
6 #define SORT_NOCASE 2048
7 #define STUDLY_INDEXING 4096
8+#define INDEXOPT_INDEXES 8192
9
10 #define K_PAD 1
11 #define K_NOPAD 0
35b2c95a 12@@ -421,6 +422,9 @@ static const char *add_opts(cmd_parms *c
bfc879b9 13 else if (!strcasecmp(w, "IgnoreCase")) {
35b2c95a 14 option = SORT_NOCASE;
bfc879b9
ER
15 }
16+ else if (!strcasecmp(w, "Indexes")) {
17+ option = INDEXOPT_INDEXES;
18+ }
19 else if (!strcasecmp(w, "None")) {
20 if (action != '\0') {
21 return "Cannot combine '+' or '-' with 'None' keyword";
35b2c95a 22@@ -1970,7 +1974,7 @@ static int index_directory(request_rec *
bfc879b9
ER
23 static int handle_autoindex(request_rec *r)
24 {
25 autoindex_config_rec *d;
26- int allow_opts = ap_allow_options(r);
27+ int opt_indexes = ap_allow_options(r) & OPT_INDEXES;
28
29 d = (autoindex_config_rec *) ap_get_module_config(r->per_dir_config,
30 &autoindex_module);
35b2c95a 31@@ -1981,8 +1985,12 @@ static int handle_autoindex(request_rec
bfc879b9
ER
32 }
33
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;
39
40- if (allow_opts & OPT_INDEXES) {
41+ if (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...
This page took 0.069313 seconds and 4 git commands to generate.