mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 14:13:33 -06:00
Avoided to add duplicate hash key in ngx_http_types_slot().
This commit is contained in:
parent
840d205bac
commit
bba2ce8aae
@ -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) {
|
if (ngx_strcmp(value[i].data, type[n].key.data) == 0) {
|
||||||
ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
|
ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
|
||||||
"duplicate MIME type \"%V\"", &value[i]);
|
"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 = value[i];
|
||||||
type->key_hash = hash;
|
type->key_hash = hash;
|
||||||
type->value = (void *) 4;
|
type->value = (void *) 4;
|
||||||
|
|
||||||
|
next:
|
||||||
|
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NGX_CONF_OK;
|
return NGX_CONF_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user