diff options
Diffstat (limited to '2.2/patches/02_all_gentoo_mod_dir_incremental.patch')
-rw-r--r-- | 2.2/patches/02_all_gentoo_mod_dir_incremental.patch | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/2.2/patches/02_all_gentoo_mod_dir_incremental.patch b/2.2/patches/02_all_gentoo_mod_dir_incremental.patch deleted file mode 100644 index 8253fc0..0000000 --- a/2.2/patches/02_all_gentoo_mod_dir_incremental.patch +++ /dev/null @@ -1,96 +0,0 @@ -Index: httpd-2.2.6/modules/mappers/mod_dir.c -=================================================================== ---- httpd-2.2.6.orig/modules/mappers/mod_dir.c -+++ httpd-2.2.6/modules/mappers/mod_dir.c -@@ -39,6 +39,7 @@ typedef enum { - - typedef struct dir_config_struct { - apr_array_header_t *index_names; -+ apr_array_header_t *index_names_incr; - slash_cfg do_slash; - } dir_config_rec; - -@@ -55,6 +56,23 @@ static const char *add_index(cmd_parms * - return NULL; - } - -+static const char *add_index_incr(cmd_parms *cmd, void *dummy, const char *arg) -+{ -+ const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY); -+ -+ if (err != NULL) { -+ return err; -+ } -+ -+ dir_config_rec *d = dummy; -+ -+ if (!d->index_names_incr) { -+ d->index_names_incr = apr_array_make(cmd->pool, 2, sizeof(char *)); -+ } -+ *(const char **)apr_array_push(d->index_names_incr) = arg; -+ return NULL; -+} -+ - static const char *configure_slash(cmd_parms *cmd, void *d_, int arg) - { - dir_config_rec *d = d_; -@@ -67,6 +85,8 @@ static const command_rec dir_cmds[] = - { - AP_INIT_ITERATE("DirectoryIndex", add_index, NULL, DIR_CMD_PERMS, - "a list of file names"), -+ AP_INIT_ITERATE("AddDirectoryIndex", add_index_incr, NULL, RSRC_CONF, -+ "a list of file names"), - AP_INIT_FLAG("DirectorySlash", configure_slash, NULL, DIR_CMD_PERMS, - "On or Off"), - {NULL} -@@ -77,6 +97,7 @@ static void *create_dir_config(apr_pool_ - dir_config_rec *new = apr_pcalloc(p, sizeof(dir_config_rec)); - - new->index_names = NULL; -+ new->index_names_incr = NULL; - new->do_slash = SLASH_UNSET; - return (void *) new; - } -@@ -87,7 +108,26 @@ static void *merge_dir_configs(apr_pool_ - dir_config_rec *base = (dir_config_rec *)basev; - dir_config_rec *add = (dir_config_rec *)addv; - -- new->index_names = add->index_names ? add->index_names : base->index_names; -+ -+ if (add->index_names) { -+ new->index_names = add->index_names; -+ } else { -+ new->index_names = base->index_names; -+ if (base->index_names_incr) { -+ if (!new->index_names) { -+ new->index_names = apr_array_make(p, 2, sizeof(char *)); -+ } -+ apr_array_cat(new->index_names, base->index_names_incr); -+ } -+ } -+ -+ if (add->index_names_incr) { -+ if (!new->index_names) { -+ new->index_names = apr_array_make(p, 2, sizeof(char *)); -+ } -+ apr_array_cat(new->index_names, add->index_names_incr); -+ } -+ - new->do_slash = - (add->do_slash == SLASH_UNSET) ? base->do_slash : add->do_slash; - return new; -@@ -155,6 +195,14 @@ static int fixup_dir(request_rec *r) - return DECLINED; - } - -+ if (d->index_names_incr) { -+ if (!d->index_names) { -+ d->index_names = d->index_names_incr; -+ } else { -+ apr_array_cat(d->index_names, d->index_names_incr); -+ } -+ } -+ - if (d->index_names) { - names_ptr = (char **)d->index_names->elts; - num_names = d->index_names->nelts; |