]> git.kaiwu.me - nginx.git/commitdiff
Preallocating exact number of default MIME types entries.
authorIgor Sysoev <igor@sysoev.ru>
Wed, 12 Oct 2011 09:19:57 +0000 (09:19 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 12 Oct 2011 09:19:57 +0000 (09:19 +0000)
src/http/ngx_http_core_module.c

index f500c5decbc0ebae5aecc3979470412726af185f..db0f962489d60b5e4d13d15acaf53dbd32ccc4df 100644 (file)
@@ -3400,7 +3400,7 @@ ngx_http_core_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
     }
 
     if (conf->types == NULL) {
-        conf->types = ngx_array_create(cf->pool, 4, sizeof(ngx_hash_key_t));
+        conf->types = ngx_array_create(cf->pool, 3, sizeof(ngx_hash_key_t));
         if (conf->types == NULL) {
             return NGX_CONF_ERROR;
         }