summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug MacEachern <dougm@apache.org>2001-08-23 00:03:01 +0200
committerDoug MacEachern <dougm@apache.org>2001-08-23 00:03:01 +0200
commit3ae56fb280c8105285451e71a43601828c738b16 (patch)
treeaba7cc4f7d9aa07ce09bd03bb1ba75b0277e2662
parentremove #if 0-ed ssl_hook_NewConnection code; was only left for reference, (diff)
downloadapache2-3ae56fb280c8105285451e71a43601828c738b16.tar.xz
apache2-3ae56fb280c8105285451e71a43601828c738b16.zip
reverting to sterlings original segv fix when extension_mappings is NULL
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90512 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--modules/http/mod_mime.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c
index 45ff442542..29ae4be429 100644
--- a/modules/http/mod_mime.c
+++ b/modules/http/mod_mime.c
@@ -149,7 +149,7 @@ static void *create_mime_dir_config(apr_pool_t *p, char *dummy)
mime_dir_config *new =
(mime_dir_config *) apr_palloc(p, sizeof(mime_dir_config));
- new->extension_mappings = apr_hash_make(p);
+ new->extension_mappings = NULL;
new->charsets_remove = NULL;
new->encodings_remove = NULL;
@@ -827,8 +827,10 @@ static int find_ct(request_rec *r)
ap_str_tolower(ext);
#endif
- exinfo = (extension_info*)apr_hash_get(conf->extension_mappings,
- ext, APR_HASH_KEY_STRING);
+ if (conf->extension_mappings != NULL) {
+ exinfo = (extension_info*)apr_hash_get(conf->extension_mappings,
+ ext, APR_HASH_KEY_STRING);
+ }
if (exinfo == NULL) {
if ((type = apr_hash_get(mime_type_extensions, ext,