diff options
-rw-r--r-- | CHANGES | 15 | ||||
-rw-r--r-- | CHANGES.ru | 15 | ||||
-rw-r--r-- | src/core/nginx.h | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_dav_module.c | 25 | ||||
-rw-r--r-- | src/http/modules/perl/nginx.pm | 2 | ||||
-rw-r--r-- | src/http/modules/perl/ngx_http_perl_module.c | 2 | ||||
-rw-r--r-- | src/http/ngx_http_parse.c | 1 |
7 files changed, 50 insertions, 12 deletions
@@ -1,4 +1,19 @@ +Changes with nginx 0.5.4 15 Dec 2006 + + *) Feature: the "perl" directive may be used inside the "limit_except" + block. + + *) Bugfix: the ngx_http_dav_module required the "Date" request header + line for the DELETE method. + + *) Bugfix: if one only parameter was used in the "dav_access" + directive, then nginx might report about configuration error. + + *) Bugfix: a segmentation fault might occur if the $host variable was + used; bug appeared in 0.4.14. + + Changes with nginx 0.5.3 13 Dec 2006 *) Feature: the ngx_http_perl_module supports the $r->status, diff --git a/CHANGES.ru b/CHANGES.ru index e7bb146eb..a625a0135 100644 --- a/CHANGES.ru +++ b/CHANGES.ru @@ -1,4 +1,19 @@ +Изменения в nginx 0.5.4 15.12.2006 + + *) Добавление: директиву perl можно использовать внутри блока + limit_except. + + *) Исправление: модуль ngx_http_dav_module требовал строку "Date" в + заголовке запроса для метода DELETE. + + *) Исправление: при использовании одного параметра в директиве + dav_access nginx мог сообщить об ошибке в конфигурации. + + *) Исправление: при использовании переменной $host мог произойти + segmentation fault; ошибка появилась в 0.4.14. + + Изменения в nginx 0.5.3 13.12.2006 *) Добавление: модуль ngx_http_perl_module поддерживает методы diff --git a/src/core/nginx.h b/src/core/nginx.h index e15cfe8b4..6a7973e9b 100644 --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,7 +8,7 @@ #define _NGINX_H_INCLUDED_ -#define NGINX_VERSION "0.5.3" +#define NGINX_VERSION "0.5.4" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/src/http/modules/ngx_http_dav_module.c b/src/http/modules/ngx_http_dav_module.c index 81c1dc49a..0ecf8afa8 100644 --- a/src/http/modules/ngx_http_dav_module.c +++ b/src/http/modules/ngx_http_dav_module.c @@ -106,6 +106,7 @@ ngx_http_dav_handler(ngx_http_request_t *r) ngx_int_t rc; ngx_str_t path; ngx_file_info_t fi; + ngx_table_elt_t *depth; ngx_http_dav_loc_conf_t *dlcf; /* TODO: Win32 */ @@ -162,11 +163,15 @@ ngx_http_dav_handler(ngx_http_request_t *r) if (ngx_is_dir(&fi)) { - if (r->uri.data[r->uri.len - 1] != '/' - || r->headers_in.depth == NULL - || r->headers_in.depth->value.len != sizeof("infinity") - 1 - || ngx_strcmp(r->headers_in.depth->value.data, "infinity") - != 0) + if (r->uri.data[r->uri.len - 1] != '/') { + return NGX_HTTP_BAD_REQUEST; + } + + depth = r->headers_in.depth; + + if (depth + && (depth->value.len != sizeof("infinity") - 1 + || ngx_strcmp(depth->value.data, "infinity") != 0)) { return NGX_HTTP_BAD_REQUEST; } @@ -183,9 +188,11 @@ ngx_http_dav_handler(ngx_http_request_t *r) return NGX_HTTP_BAD_REQUEST; } - if (r->headers_in.depth - && r->headers_in.depth->value.len == 1 - && r->headers_in.depth->value.data[0] == '1') + depth = r->headers_in.depth; + + if (depth + && depth->value.len == 1 + && depth->value.data[0] == '1') { return NGX_HTTP_BAD_REQUEST; } @@ -476,7 +483,7 @@ ngx_http_dav_access(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) lcf->access = 0700; - for (i = 1; i < 3; i++) { + for (i = 1; i < cf->args->nelts; i++) { p = value[i].data; diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm index 2f6a66306..9cab14295 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.3'; +our $VERSION = '0.5.4'; require XSLoader; XSLoader::load('nginx', $VERSION); diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c index fb1642051..29296b6a2 100644 --- a/src/http/modules/perl/ngx_http_perl_module.c +++ b/src/http/modules/perl/ngx_http_perl_module.c @@ -86,7 +86,7 @@ static ngx_command_t ngx_http_perl_commands[] = { NULL }, { ngx_string("perl"), - NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1, + NGX_HTTP_LOC_CONF|NGX_HTTP_LMT_CONF|NGX_CONF_TAKE1, ngx_http_perl, NGX_HTTP_LOC_CONF_OFFSET, 0, diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c index b141000b6..135208ef0 100644 --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c @@ -290,6 +290,7 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b) state = sw_after_slash_in_uri; break; default: + r->host_end = p; return NGX_HTTP_PARSE_INVALID_REQUEST; } break; |