/[apache]/trunk/dist/2.2/patches/02_all_gentoo_mod_dir_incremental.patch
Gentoo

Diff of /trunk/dist/2.2/patches/02_all_gentoo_mod_dir_incremental.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 151 Revision 152
1diff -ur httpd-2.0.55.orig/modules/mappers/mod_dir.c httpd-2.0.55/modules/mappers/mod_dir.c 1diff -ur httpd-2.0.58.orig/modules/mappers/mod_dir.c httpd-2.0.58/modules/mappers/mod_dir.c
2--- httpd-2.0.55.orig/modules/mappers/mod_dir.c 2005-02-04 12:21:18.000000000 -0800 2--- httpd-2.0.58.orig/modules/mappers/mod_dir.c 2007-03-31 19:36:23.000000000 -0400
3+++ httpd-2.0.55/modules/mappers/mod_dir.c 2006-03-31 17:56:16.000000000 -0800 3+++ httpd-2.0.58/modules/mappers/mod_dir.c 2007-03-31 19:39:22.000000000 -0400
4@@ -39,6 +39,7 @@ 4@@ -39,6 +39,7 @@
5 5
6 typedef struct dir_config_struct { 6 typedef struct dir_config_struct {
7 apr_array_header_t *index_names; 7 apr_array_header_t *index_names;
8+ apr_array_header_t *index_names_incr; 8+ apr_array_header_t *index_names_incr;
9 slash_cfg do_slash; 9 slash_cfg do_slash;
10 } dir_config_rec; 10 } dir_config_rec;
11 11
12@@ -55,6 +56,17 @@ 12@@ -55,6 +56,23 @@
13 return NULL; 13 return NULL;
14 } 14 }
15 15
16+static const char *add_index_incr(cmd_parms *cmd, void *dummy, const char *arg) 16+static const char *add_index_incr(cmd_parms *cmd, void *dummy, const char *arg)
17+{ 17+{
18+ const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
19+
20+ if (err != NULL) {
21+ return err;
22+ }
23+
18+ dir_config_rec *d = dummy; 24+ dir_config_rec *d = dummy;
19+ 25+
20+ if (!d->index_names_incr) { 26+ if (!d->index_names_incr) {
21+ d->index_names_incr = apr_array_make(cmd->pool, 2, sizeof(char *)); 27+ d->index_names_incr = apr_array_make(cmd->pool, 2, sizeof(char *));
22+ } 28+ }
25+} 31+}
26+ 32+
27 static const char *configure_slash(cmd_parms *cmd, void *d_, int arg) 33 static const char *configure_slash(cmd_parms *cmd, void *d_, int arg)
28 { 34 {
29 dir_config_rec *d = d_; 35 dir_config_rec *d = d_;
30@@ -67,6 +79,8 @@ 36@@ -67,6 +85,8 @@
31 { 37 {
32 AP_INIT_ITERATE("DirectoryIndex", add_index, NULL, DIR_CMD_PERMS, 38 AP_INIT_ITERATE("DirectoryIndex", add_index, NULL, DIR_CMD_PERMS,
33 "a list of file names"), 39 "a list of file names"),
34+ AP_INIT_ITERATE("AddDirectoryIndex", add_index_incr, NULL, DIR_CMD_PERMS, 40+ AP_INIT_ITERATE("AddDirectoryIndex", add_index_incr, NULL, RSRC_CONF,
35+ "a list of file names"), 41+ "a list of file names"),
36 AP_INIT_FLAG("DirectorySlash", configure_slash, NULL, DIR_CMD_PERMS, 42 AP_INIT_FLAG("DirectorySlash", configure_slash, NULL, DIR_CMD_PERMS,
37 "On or Off"), 43 "On or Off"),
38 {NULL} 44 {NULL}
39@@ -77,6 +91,7 @@ 45@@ -77,6 +97,7 @@
40 dir_config_rec *new = apr_pcalloc(p, sizeof(dir_config_rec)); 46 dir_config_rec *new = apr_pcalloc(p, sizeof(dir_config_rec));
41 47
42 new->index_names = NULL; 48 new->index_names = NULL;
43+ new->index_names_incr = NULL; 49+ new->index_names_incr = NULL;
44 new->do_slash = SLASH_UNSET; 50 new->do_slash = SLASH_UNSET;
45 return (void *) new; 51 return (void *) new;
46 } 52 }
47@@ -87,7 +102,26 @@ 53@@ -87,7 +108,26 @@
48 dir_config_rec *base = (dir_config_rec *)basev; 54 dir_config_rec *base = (dir_config_rec *)basev;
49 dir_config_rec *add = (dir_config_rec *)addv; 55 dir_config_rec *add = (dir_config_rec *)addv;
50 56
51- new->index_names = add->index_names ? add->index_names : base->index_names; 57- new->index_names = add->index_names ? add->index_names : base->index_names;
52+ 58+
70+ } 76+ }
71+ 77+
72 new->do_slash = 78 new->do_slash =
73 (add->do_slash == SLASH_UNSET) ? base->do_slash : add->do_slash; 79 (add->do_slash == SLASH_UNSET) ? base->do_slash : add->do_slash;
74 return new; 80 return new;
75@@ -155,6 +189,14 @@ 81@@ -155,6 +195,14 @@
76 return DECLINED; 82 return DECLINED;
77 } 83 }
78 84
79+ if (d->index_names_incr) { 85+ if (d->index_names_incr) {
80+ if (!d->index_names) { 86+ if (!d->index_names) {

Legend:
Removed from v.151  
changed lines
  Added in v.152

  ViewVC Help
Powered by ViewVC 1.1.20