summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-02-23 12:38:40 +0000
committerJonathan Kolb <jon@b0g.us>2007-02-23 12:38:40 +0000
commitbfec3c49c20668e1e4058a7bc94e76ae27f73e65 (patch)
tree1ba729f18ac2f721eaa758d175060cce338255f1
parent0125d5427cc3998ab3a1e45632173a9366590891 (diff)
downloadnginx-0.5.14.tar.gz
Changes with nginx 0.5.14 23 Feb 2007v0.5.14
*) Bugfix: nginx ignored superfluous closing "}" in the end of configuration file.
-rw-r--r--CHANGES6
-rw-r--r--CHANGES.ru6
-rw-r--r--src/core/nginx.h2
-rw-r--r--src/core/ngx_conf_file.c107
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c6
-rw-r--r--src/http/modules/ngx_http_proxy_module.c6
-rw-r--r--src/http/modules/perl/nginx.pm2
7 files changed, 64 insertions, 71 deletions
diff --git a/CHANGES b/CHANGES
index 25b559d7e..9ba591e97 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,10 @@
+Changes with nginx 0.5.14 23 Feb 2007
+
+ *) Bugfix: nginx ignored superfluous closing "}" in the end of
+ configuration file.
+
+
Changes with nginx 0.5.13 19 Feb 2007
*) Feature: the COPY and MOVE methods.
diff --git a/CHANGES.ru b/CHANGES.ru
index 6c3cd77fa..76c7f84ee 100644
--- a/CHANGES.ru
+++ b/CHANGES.ru
@@ -1,4 +1,10 @@
+Изменения в nginx 0.5.14 23.02.2007
+
+ *) Исправление: nginx игнорировал лишние закрывающие скобки "}" в конце
+ конфигурационноого файла.
+
+
Изменения в nginx 0.5.13 19.02.2007
*) Добавление: методы COPY и MOVE.
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 1c09ec6ae..8c8ce80e2 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,7 +8,7 @@
#define _NGINX_H_INCLUDED_
-#define NGINX_VERSION "0.5.13"
+#define NGINX_VERSION "0.5.14"
#define NGINX_VER "nginx/" NGINX_VERSION
#define NGINX_VAR "NGINX"
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
index e06315ee5..b33b1d502 100644
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -141,24 +141,26 @@ ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename)
*/
if (rc == NGX_ERROR) {
- break;
+ goto done;
}
if (rc == NGX_CONF_BLOCK_DONE) {
+ if (!block) {
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "unexpected \"}\"");
+ goto failed;
+ }
+
block = 0;
}
if (rc == NGX_CONF_FILE_DONE && block) {
- ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
- "unexpected end of file in %s:%ui, expecting \"}\"",
- cf->conf_file->file.name.data,
- cf->conf_file->line);
- rc = NGX_ERROR;
- break;
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "unexpected end of file, expecting \"}\"");
+ goto failed;
}
if (rc != NGX_OK && rc != NGX_CONF_BLOCK_START) {
- break;
+ goto done;
}
if (cf->handler) {
@@ -174,26 +176,27 @@ ngx_conf_parse(ngx_conf_t *cf, ngx_str_t *filename)
}
if (rv == NGX_CONF_ERROR) {
- rc = NGX_ERROR;
- break;
+ goto failed;
}
- ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
- "%s in %s:%ui",
- rv, cf->conf_file->file.name.data,
- cf->conf_file->line);
- rc = NGX_ERROR;
- break;
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, rv);
+
+ goto failed;
}
rc = ngx_conf_handler(cf, rc);
if (rc == NGX_ERROR) {
- break;
+ goto failed;
}
}
+failed:
+
+ rc = NGX_ERROR;
+
+done:
if (filename) {
ngx_free(cf->conf_file->buffer->start);
@@ -267,20 +270,16 @@ ngx_conf_handler(ngx_conf_t *cf, ngx_int_t last)
}
if (!(cmd->type & NGX_CONF_BLOCK) && last != NGX_OK) {
- ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
- "directive \"%s\" in %s:%ui "
- "is not terminated by \";\"",
- name->data, cf->conf_file->file.name.data,
- cf->conf_file->line);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "directive \"%s\" is not terminated by \";\"",
+ name->data);
return NGX_ERROR;
}
if ((cmd->type & NGX_CONF_BLOCK) && last != NGX_CONF_BLOCK_START) {
- ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
- "directive \"%s\" in %s:%ui "
- "has not the opening \"{\"",
- name->data, cf->conf_file->file.name.data,
- cf->conf_file->line);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "directive \"%s\" has no opening \"{\"",
+ name->data);
return NGX_ERROR;
}
@@ -344,40 +343,31 @@ ngx_conf_handler(ngx_conf_t *cf, ngx_int_t last)
return NGX_ERROR;
}
- ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
- "the \"%s\" directive %s in %s:%ui",
- name->data, rv, cf->conf_file->file.name.data,
- cf->conf_file->line);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "the \"%s\" directive %s", name->data, rv);
return NGX_ERROR;
}
}
if (multi == 0) {
- ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
- "unknown directive \"%s\" in %s:%ui",
- name->data, cf->conf_file->file.name.data,
- cf->conf_file->line);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "unknown directive \"%s\"", name->data);
return NGX_ERROR;
}
not_allowed:
- ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
- "directive \"%s\" in %s:%ui "
- "is not allowed here",
- name->data, cf->conf_file->file.name.data,
- cf->conf_file->line);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "directive \"%s\" is not allowed here", name->data);
return NGX_ERROR;
invalid:
- ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
- "invalid number arguments in "
- "directive \"%s\" in %s:%ui",
- name->data, cf->conf_file->file.name.data,
- cf->conf_file->line);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "invalid number arguments in directive \"%s\"",
+ name->data);
return NGX_ERROR;
}
@@ -412,11 +402,9 @@ ngx_conf_read_token(ngx_conf_t *cf)
>= ngx_file_size(&cf->conf_file->file.info))
{
if (cf->args->nelts > 0) {
- ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
- "unexpected end of file in %s:%ui, "
- "expecting \";\" or \"}\"",
- cf->conf_file->file.name.data,
- cf->conf_file->line);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "unexpected end of file, "
+ "expecting \";\" or \"}\"");
return NGX_ERROR;
}
@@ -480,11 +468,8 @@ ngx_conf_read_token(ngx_conf_t *cf)
need_space = 0;
} else {
- ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
- "unexpected \"%c\" in %s:%ui",
- ch, cf->conf_file->file.name.data,
- cf->conf_file->line);
-
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "unexpected \"%c\"", ch);
return NGX_ERROR;
}
}
@@ -501,10 +486,8 @@ ngx_conf_read_token(ngx_conf_t *cf)
case ';':
case '{':
if (cf->args->nelts == 0) {
- ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
- "unexpected \"%c\" in %s:%ui",
- ch, cf->conf_file->file.name.data,
- cf->conf_file->line);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "unexpected \"%c\"", ch);
return NGX_ERROR;
}
@@ -516,10 +499,8 @@ ngx_conf_read_token(ngx_conf_t *cf)
case '}':
if (cf->args->nelts != 0) {
- ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
- "unexpected \"}\" in %s:%ui",
- cf->conf_file->file.name.data,
- cf->conf_file->line);
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "unexpected \"}\"");
return NGX_ERROR;
}
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index bf104d74b..34b87f79f 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -1633,7 +1633,7 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
if (conf->upstream.busy_buffers_size < size) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"\"fastcgi_busy_buffers_size\" must be equal or bigger than "
- "maximum of the value of \"fastcgi_header_buffer_size\" and "
+ "maximum of the value of \"fastcgi_buffer_size\" and "
"one of the \"fastcgi_buffers\"");
return NGX_CONF_ERROR;
@@ -1664,7 +1664,7 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
if (conf->upstream.temp_file_write_size < size) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"\"fastcgi_temp_file_write_size\" must be equal or bigger than "
- "maximum of the value of \"fastcgi_header_buffer_size\" and "
+ "maximum of the value of \"fastcgi_buffer_size\" and "
"one of the \"fastcgi_buffers\"");
return NGX_CONF_ERROR;
@@ -1688,7 +1688,7 @@ ngx_http_fastcgi_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"\"fastcgi_max_temp_file_size\" must be equal to zero to disable "
"the temporary files usage or must be equal or bigger than "
- "maximum of the value of \"fastcgi_header_buffer_size\" and "
+ "maximum of the value of \"fastcgi_buffer_size\" and "
"one of the \"fastcgi_buffers\"");
return NGX_CONF_ERROR;
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index cbd2ce8e0..344ac9a07 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -1585,7 +1585,7 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
if (conf->upstream.busy_buffers_size < size) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"\"proxy_busy_buffers_size\" must be equal or bigger than "
- "maximum of the value of \"proxy_header_buffer_size\" and "
+ "maximum of the value of \"proxy_buffer_size\" and "
"one of the \"proxy_buffers\"");
return NGX_CONF_ERROR;
@@ -1616,7 +1616,7 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
if (conf->upstream.temp_file_write_size < size) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"\"proxy_temp_file_write_size\" must be equal or bigger than "
- "maximum of the value of \"proxy_header_buffer_size\" and "
+ "maximum of the value of \"proxy_buffer_size\" and "
"one of the \"proxy_buffers\"");
return NGX_CONF_ERROR;
@@ -1639,7 +1639,7 @@ ngx_http_proxy_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"\"proxy_max_temp_file_size\" must be equal to zero to disable "
"the temporary files usage or must be equal or bigger than "
- "maximum of the value of \"proxy_header_buffer_size\" and "
+ "maximum of the value of \"proxy_buffer_size\" and "
"one of the \"proxy_buffers\"");
return NGX_CONF_ERROR;
diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm
index 63dca3581..aa50bafe1 100644
--- a/src/http/modules/perl/nginx.pm
+++ b/src/http/modules/perl/nginx.pm
@@ -47,7 +47,7 @@ our @EXPORT = qw(
HTTP_INSUFFICIENT_STORAGE
);
-our $VERSION = '0.5.13';
+our $VERSION = '0.5.14';
require XSLoader;
XSLoader::load('nginx', $VERSION);