# HG changeset patch # User Igor Sysoev # Date 1247428800 -14400 # Node ID e8b686f230a83ac654d963d1d8e0f96893e0c372 # Parent 1191e3250e60396a6bef7e4d668b2680fc92cb36 nginx 0.8.5 *) Bugfix: now nginx allows underscores in a request method. *) Bugfix: a 500 error code was returned for invalid login/password while HTTP Basic authentication on Windows. *) Bugfix: ngx_http_perl_module responses did not work in subrequests. *) Bugfix: in ngx_http_limit_req_module. Thanks to Maxim Dounin. diff --git a/CHANGES b/CHANGES --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,17 @@ +Changes with nginx 0.8.5 13 Jul 2009 + + *) Bugfix: now nginx allows underscores in a request method. + + *) Bugfix: a 500 error code was returned for invalid login/password + while HTTP Basic authentication on Windows. + + *) Bugfix: ngx_http_perl_module responses did not work in subrequests. + + *) Bugfix: in ngx_http_limit_req_module. + Thanks to Maxim Dounin. + + Changes with nginx 0.8.4 22 Jun 2009 *) Bugfix: nginx could not be built --without-http-cache; the bug had @@ -26,7 +39,8 @@ Changes with nginx 0.8.2 *) Bugfix: in open_file_cache and proxy/fastcgi cache interaction on start up. - *) Bugfix: open_file_cache might cache open file descriptors too long. + *) Bugfix: open_file_cache might cache open file descriptors too long; + the bug had appeared in 0.7.4. Changes with nginx 0.8.1 08 Jun 2009 diff --git a/CHANGES.ru b/CHANGES.ru --- a/CHANGES.ru +++ b/CHANGES.ru @@ -1,4 +1,18 @@ +Изменения в nginx 0.8.5 13.07.2009 + + *) Исправление: теперь nginx разрешает подчёркивания в методе запроса. + + *) Исправление: при использовании HTTP Basic-аутентификации на Windows + для неверных имени/пароля возвращалась 500-ая ошибка. + + *) Исправление: ответы модуля ngx_http_perl_module не работали в + подзапросах. + + *) Исправление: в модуле ngx_http_limit_req_module. + Спасибо Максиму Дунину. + + Изменения в nginx 0.8.4 22.06.2009 *) Исправление: nginx не собирался с параметром --without-http-cache; @@ -14,9 +28,9 @@ *) Исправление: nginx не собирался с параметром --without-http-cache; ошибка появилась в 0.8.2. - *) Исправление: если было использовался перехват 401 ошибки от бэкенда - и бэкенд не возвращал строку "WWW-Authenticate" в заголовке ответа, - то в рабочем процессе происходил segmentation fault. + *) Исправление: если использовался перехват 401 ошибки от бэкенда и + бэкенд не возвращал строку "WWW-Authenticate" в заголовке ответа, то + в рабочем процессе происходил segmentation fault. Спасибо Евгению Мычло. @@ -26,7 +40,7 @@ на старте. *) Исправление: open_file_cache мог кэшировать открытые файлы очень - долго. + долго; ошибка появилась в 0.7.4. Изменения в nginx 0.8.1 08.06.2009 diff --git a/src/core/nginx.h b/src/core/nginx.h --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,8 +8,8 @@ #define _NGINX_H_INCLUDED_ -#define nginx_version 8004 -#define NGINX_VERSION "0.8.4" +#define nginx_version 8005 +#define NGINX_VERSION "0.8.5" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/src/http/modules/ngx_http_limit_req_module.c b/src/http/modules/ngx_http_limit_req_module.c --- a/src/http/modules/ngx_http_limit_req_module.c +++ b/src/http/modules/ngx_http_limit_req_module.c @@ -181,7 +181,7 @@ ngx_http_limit_req_handler(ngx_http_requ } ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, - "limit_req: %i %ui.%03ui", rc, excess / 1000, excess % 1000); + "limit_req: %i %ui.%03ui", rc, excess / 1000, excess % 1000); if (rc == NGX_BUSY) { ngx_shmtx_unlock(&ctx->shpool->mutex); @@ -263,8 +263,23 @@ done: static void ngx_http_limit_req_delay(ngx_http_request_t *r) { + ngx_event_t *wev; + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, - "limit_req delay"); + "limit_req delay"); + + wev = r->connection->write; + + if (!wev->timedout) { + + if (ngx_handle_write_event(wev, 0) != NGX_OK) { + ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); + } + + return; + } + + wev->timedout = 0; if (ngx_handle_read_event(r->connection->read, 0) != NGX_OK) { ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm --- 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.8.4'; +our $VERSION = '0.8.5'; require XSLoader; XSLoader::load('nginx', $VERSION); diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c @@ -143,7 +143,7 @@ ngx_http_parse_request_line(ngx_http_req break; } - if (ch < 'A' || ch > 'Z') { + if ((ch < 'A' || ch > 'Z') && ch != '_') { return NGX_HTTP_PARSE_INVALID_METHOD; } @@ -257,7 +257,7 @@ ngx_http_parse_request_line(ngx_http_req break; } - if (ch < 'A' || ch > 'Z') { + if ((ch < 'A' || ch > 'Z') && ch != '_') { return NGX_HTTP_PARSE_INVALID_METHOD; } diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2694,7 +2694,13 @@ ngx_http_send_special(ngx_http_request_t } if (flags & NGX_HTTP_LAST) { - b->last_buf = 1; + + if (r == r->main && !r->post_action) { + b->last_buf = 1; + + } else { + b->last_in_chain = 1; + } } if (flags & NGX_HTTP_FLUSH) { diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -2888,7 +2888,7 @@ ngx_http_upstream_finalize_request(ngx_h r->connection->log->action = "sending to client"; - if (rc == 0 && r == r->main && !r->post_action) { + if (rc == 0) { rc = ngx_http_send_special(r, NGX_HTTP_LAST); }