From: William A. Rowe Jr Date: Thu, 16 Aug 2001 21:23:29 +0000 (+0000) Subject: The two more Remove flavors needed testing, as well. While I'm at it, X-Git-Tag: 2.0.24~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c0c1a70a2911b9a6949208e97fc98b289870bf2;p=apache The two more Remove flavors needed testing, as well. While I'm at it, add a reasonable explanation of why we are about to copy. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90245 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c index 7d121ad76c..928f349aa8 100644 --- a/modules/http/mod_mime.c +++ b/modules/http/mod_mime.c @@ -251,9 +251,15 @@ static void *merge_mime_dir_configs(apr_pool_t *p, void *basev, void *addv) else { new->extension_mappings = base->extension_mappings; } - if (new->extension_mappings && (add->handlers_remove - || add->types_remove - || add->encodings_remove)) { + /* We may not be merging the tables, but if we potentially will change + * an exinfo member, then we are about to trounce it anyways. + * We must have a copy for safety. + */ + if (new->extension_mappings && (add->charsets_remove + || add->encodings_remove + || add->handlers_remove + || add->languages_remove + || add->types_remove)) { apr_hash_t *copyhash = new->extension_mappings; new->extension_mappings = apr_hash_make(p); overlay_extension_mappings(p, copyhash, new->extension_mappings);