summaryrefslogtreecommitdiff
path: root/src/core/ngx_file.c
diff options
context:
space:
mode:
authornginx <nginx@nginx.org>2013-09-17 13:36:21 +0000
committerJon Kolb <jon@b0g.us>2013-09-17 13:36:21 +0000
commitc6e358d8a8b9773f4244cca3fb0f4dff1a93c838 (patch)
treed521395e241ea7525b0743b76c97913319c6fda8 /src/core/ngx_file.c
parentb4f0587460c1cec132bbf547b658057a674aa94e (diff)
downloadnginx-1.5.5.tar.gz
Changes with nginx 1.5.5 17 Sep 2013v1.5.5
*) Change: now nginx assumes HTTP/1.0 by default if it is not able to detect protocol reliably. *) Feature: the "disable_symlinks" directive now uses O_PATH on Linux. *) Feature: now nginx uses EPOLLRDHUP events to detect premature connection close by clients if the "epoll" method is used. *) Bugfix: in the "valid_referers" directive if the "server_names" parameter was used. *) Bugfix: the $request_time variable did not work in nginx/Windows. *) Bugfix: in the "image_filter" directive. Thanks to Lanshun Zhou. *) Bugfix: OpenSSL 1.0.1f compatibility. Thanks to Piotr Sikora.
Diffstat (limited to 'src/core/ngx_file.c')
-rw-r--r--src/core/ngx_file.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/core/ngx_file.c b/src/core/ngx_file.c
index 28e8871ec..7e6e921a3 100644
--- a/src/core/ngx_file.c
+++ b/src/core/ngx_file.c
@@ -359,9 +359,6 @@ ngx_conf_set_path_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
return NULL;
}
- path->len = 0;
- path->manager = NULL;
- path->loader = NULL;
path->conf_file = cf->conf_file->file.name.data;
path->line = cf->conf_file->line;
@@ -402,7 +399,7 @@ ngx_conf_merge_path_value(ngx_conf_t *cf, ngx_path_t **path, ngx_path_t *prev,
return NGX_CONF_OK;
}
- *path = ngx_palloc(cf->pool, sizeof(ngx_path_t));
+ *path = ngx_pcalloc(cf->pool, sizeof(ngx_path_t));
if (*path == NULL) {
return NGX_CONF_ERROR;
}
@@ -421,10 +418,6 @@ ngx_conf_merge_path_value(ngx_conf_t *cf, ngx_path_t **path, ngx_path_t *prev,
+ init->level[1] + (init->level[1] ? 1 : 0)
+ init->level[2] + (init->level[2] ? 1 : 0);
- (*path)->manager = NULL;
- (*path)->loader = NULL;
- (*path)->conf_file = NULL;
-
if (ngx_add_path(cf, path) != NGX_OK) {
return NGX_CONF_ERROR;
}
@@ -508,6 +501,14 @@ ngx_add_path(ngx_conf_t *cf, ngx_path_t **slot)
if (p[i]->name.len == path->name.len
&& ngx_strcmp(p[i]->name.data, path->name.data) == 0)
{
+ if (p[i]->data != path->data) {
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "the same path name \"%V\" "
+ "used in %s:%ui and",
+ &p[i]->name, p[i]->conf_file, p[i]->line);
+ return NGX_ERROR;
+ }
+
for (n = 0; n < 3; n++) {
if (p[i]->level[n] != path->level[n]) {
if (path->conf_file == NULL) {