Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 4200:4f5b3714eead
Preallocating exact number of default MIME types entries.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 12 Oct 2011 09:19:57 +0000 |
parents | 9ff4acd99289 |
children | 7a739880b80c |
comparison
equal
deleted
inserted
replaced
4199:874a2f505e2a | 4200:4f5b3714eead |
---|---|
3398 conf->types = prev->types; | 3398 conf->types = prev->types; |
3399 conf->types_hash = prev->types_hash; | 3399 conf->types_hash = prev->types_hash; |
3400 } | 3400 } |
3401 | 3401 |
3402 if (conf->types == NULL) { | 3402 if (conf->types == NULL) { |
3403 conf->types = ngx_array_create(cf->pool, 4, sizeof(ngx_hash_key_t)); | 3403 conf->types = ngx_array_create(cf->pool, 3, sizeof(ngx_hash_key_t)); |
3404 if (conf->types == NULL) { | 3404 if (conf->types == NULL) { |
3405 return NGX_CONF_ERROR; | 3405 return NGX_CONF_ERROR; |
3406 } | 3406 } |
3407 | 3407 |
3408 for (i = 0; ngx_http_core_default_types[i].key.len; i++) { | 3408 for (i = 0; ngx_http_core_default_types[i].key.len; i++) { |