Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGu Feng <flygoast@126.com>2014-09-17 18:52:02 +0400
committerGu Feng <flygoast@126.com>2014-09-17 18:52:02 +0400
commitbba2ce8aae96cfc81fa338dde1675397dd3bed4c (patch)
treedb450f2d29f1b03fbd47e2938d6bf8564920c65f /src/http/ngx_http.c
parent840d205bac9a65ad0a9e78353bd773fcbc13da04 (diff)
Avoided to add duplicate hash key in ngx_http_types_slot().
Diffstat (limited to 'src/http/ngx_http.c')
-rw-r--r--src/http/ngx_http.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index 31577f9a2..9c8d6cba4 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -2005,7 +2005,7 @@ ngx_http_types_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
if (ngx_strcmp(value[i].data, type[n].key.data) == 0) {
ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
"duplicate MIME type \"%V\"", &value[i]);
- continue;
+ goto next;
}
}
@@ -2017,6 +2017,10 @@ ngx_http_types_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
type->key = value[i];
type->key_hash = hash;
type->value = (void *) 4;
+
+ next:
+
+ continue;
}
return NGX_CONF_OK;