diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-07-07 09:51:41 +0000 |
---|---|---|
committer | Jonathan Kolb <jon@b0g.us> | 2008-07-07 09:51:41 +0000 |
commit | 886b713c0b9c3521e5bfae45c242c8b289771a5e (patch) | |
tree | 6ee74ade586b3b689a5a96455d0aa6c5e9bf7658 | |
parent | 7ce162d7f81eea69e7795a959b8ccad0dc360483 (diff) | |
download | nginx-0.7.6.tar.gz |
Changes with nginx 0.7.6 07 Jul 2008v0.7.6
*) Bugfix: now if variables are used in the "access_log" directive a
request root existence is always tested.
*) Bugfix: the ngx_http_flv_module did not support several values in a
query string.
-rw-r--r-- | CHANGES | 13 | ||||
-rw-r--r-- | CHANGES.ru | 11 | ||||
-rw-r--r-- | src/core/nginx.h | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_flv_module.c | 12 | ||||
-rw-r--r-- | src/http/modules/ngx_http_gzip_static_module.c | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_log_module.c | 23 | ||||
-rw-r--r-- | src/http/modules/ngx_http_static_module.c | 2 | ||||
-rw-r--r-- | src/http/modules/perl/nginx.pm | 2 | ||||
-rw-r--r-- | src/http/ngx_http_core_module.c | 6 | ||||
-rw-r--r-- | src/http/ngx_http_request.h | 1 |
10 files changed, 61 insertions, 13 deletions
@@ -1,8 +1,17 @@ +Changes with nginx 0.7.6 07 Jul 2008 + + *) Bugfix: now if variables are used in the "access_log" directive a + request root existence is always tested. + + *) Bugfix: the ngx_http_flv_module did not support several values in a + query string. + + Changes with nginx 0.7.5 01 Jul 2008 - *) Bugfixes in variables support in the "access_log" directive; the bug - had appeared in 0.7.4. + *) Bugfixes in variables support in the "access_log" directive; the + bugs had appeared in 0.7.4. *) Bugfix: nginx could not be built --without-http_gzip_module; the bug had appeared in 0.7.3. diff --git a/CHANGES.ru b/CHANGES.ru index a950aa5f8..56abbc105 100644 --- a/CHANGES.ru +++ b/CHANGES.ru @@ -1,7 +1,16 @@ +Изменения в nginx 0.7.6 07.07.2008 + + *) Исправление: теперь при использовании переменных в директиве + access_log всегда проверяется существовании root'а для запроса. + + *) Исправление: модуль ngx_http_flv_module не поддерживал несколько + значений в аргументах запроса. + + Изменения в nginx 0.7.5 01.07.2008 - *) Исправления в поддержке переменных в директиве access_log; ошибка + *) Исправления в поддержке переменных в директиве access_log; ошибки появилась в 0.7.4. *) Исправление: nginx не собирался с параметром diff --git a/src/core/nginx.h b/src/core/nginx.h index 4c397c12c..50236196c 100644 --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,7 +8,7 @@ #define _NGINX_H_INCLUDED_ -#define NGINX_VERSION "0.7.5" +#define NGINX_VERSION "0.7.6" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/src/http/modules/ngx_http_flv_module.c b/src/http/modules/ngx_http_flv_module.c index cc2ec4da1..235ccddea 100644 --- a/src/http/modules/ngx_http_flv_module.c +++ b/src/http/modules/ngx_http_flv_module.c @@ -60,7 +60,7 @@ ngx_module_t ngx_http_flv_module = { static ngx_int_t ngx_http_flv_handler(ngx_http_request_t *r) { - u_char *p, *last; + u_char *p, *n, *last; off_t start, len; size_t root; ngx_int_t rc; @@ -159,6 +159,8 @@ ngx_http_flv_handler(ngx_http_request_t *r) return NGX_DECLINED; } + r->root_tested = 1; + start = 0; len = of.size; i = 1; @@ -169,7 +171,13 @@ ngx_http_flv_handler(ngx_http_request_t *r) if (p) { p += 6; - start = ngx_atoof(p, r->args.len - (p - r->args.data)); + for (n = p; n < r->args.data + r->args.len; n++) { + if (*n == '&') { + break; + } + } + + start = ngx_atoof(p, n - p); if (start == NGX_ERROR || start >= len) { start = 0; diff --git a/src/http/modules/ngx_http_gzip_static_module.c b/src/http/modules/ngx_http_gzip_static_module.c index 41ac0d3ee..51fe0d56d 100644 --- a/src/http/modules/ngx_http_gzip_static_module.c +++ b/src/http/modules/ngx_http_gzip_static_module.c @@ -175,6 +175,8 @@ ngx_http_gzip_static_handler(ngx_http_request_t *r) #endif + r->root_tested = 1; + rc = ngx_http_discard_request_body(r); if (rc != NGX_OK) { diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c index ce7559753..5b8adc595 100644 --- a/src/http/modules/ngx_http_log_module.c +++ b/src/http/modules/ngx_http_log_module.c @@ -366,7 +366,7 @@ ngx_http_log_script_write(ngx_http_request_t *r, ngx_http_log_script_t *script, ngx_http_log_loc_conf_t *llcf; ngx_http_core_loc_conf_t *clcf; - if (r->err_status == NGX_HTTP_NOT_FOUND) { + if (!r->root_tested) { /* test root directory existance */ @@ -387,10 +387,25 @@ ngx_http_log_script_write(ngx_http_request_t *r, ngx_http_log_script_t *script, of.events = clcf->open_file_cache_events; if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool) - != NGX_OK - || !of.is_dir) + != NGX_OK) { - /* no root directory: simulate successfull logging */ + if (of.err == 0) { + /* simulate successfull logging */ + return len; + } + + ngx_log_error(NGX_LOG_ERR, r->connection->log, of.err, + "testing \"%s\" existence failed", path.data); + + /* simulate successfull logging */ + return len; + } + + if (!of.is_dir) { + ngx_log_error(NGX_LOG_ERR, r->connection->log, NGX_ENOTDIR, + "testing \"%s\" existence failed", path.data); + + /* simulate successfull logging */ return len; } } diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c index f5d697101..ce2f0fc65 100644 --- a/src/http/modules/ngx_http_static_module.c +++ b/src/http/modules/ngx_http_static_module.c @@ -140,6 +140,8 @@ ngx_http_static_handler(ngx_http_request_t *r) return rc; } + r->root_tested = 1; + ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, "http static fd: %d", of.fd); if (of.is_dir) { diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm index 346c2c052..54e98991f 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.7.5'; +our $VERSION = '0.7.6'; require XSLoader; XSLoader::load('nginx', $VERSION); diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index f7b8b5b17..20aba8653 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -3499,7 +3499,7 @@ ngx_http_core_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) max = ngx_atoi(value[i].data + 4, value[i].len - 4); if (max == NGX_ERROR) { - return NGX_CONF_ERROR; + goto failed; } continue; @@ -3512,7 +3512,7 @@ ngx_http_core_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) inactive = ngx_parse_time(&s, 1); if (inactive < 0) { - return NGX_CONF_ERROR; + goto failed; } continue; @@ -3525,6 +3525,8 @@ ngx_http_core_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) continue; } + failed: + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "invalid \"open_file_cache\" parameter \"%V\"", &value[i]); diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h index 1a4eae106..be22db636 100644 --- a/src/http/ngx_http_request.h +++ b/src/http/ngx_http_request.h @@ -469,6 +469,7 @@ struct ngx_http_request_s { unsigned request_output:1; unsigned header_sent:1; unsigned expect_tested:1; + unsigned root_tested:1; unsigned done:1; unsigned utf8:1; |