summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-07-13 11:48:05 +0000
committerJonathan Kolb <jon@b0g.us>2009-07-13 11:48:05 +0000
commitccb71228cbec260e8921e698a34c57da5b0693cd (patch)
tree6b30300e4456fc749fb0f5d39087c592c33356cd
parent83116b3fea0173c4fdc4993c757869f92fb9d799 (diff)
downloadnginx-0.8.5.tar.gz
Changes with nginx 0.8.5 13 Jul 2009v0.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.
-rw-r--r--CHANGES16
-rw-r--r--CHANGES.ru22
-rw-r--r--src/core/nginx.h4
-rw-r--r--src/http/modules/ngx_http_limit_req_module.c19
-rw-r--r--src/http/modules/perl/nginx.pm2
-rw-r--r--src/http/ngx_http_parse.c4
-rw-r--r--src/http/ngx_http_request.c8
-rw-r--r--src/http/ngx_http_upstream.c2
8 files changed, 63 insertions, 14 deletions
diff --git a/CHANGES b/CHANGES
index 420722dd8..695ff67ca 100644
--- 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 15 Jun 2009
*) 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
index b5cb0cea4..e020bce9a 100644
--- 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
index 922fa0a53..e7131c8a1 100644
--- 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
index 2a07c74e5..84e70b4f4 100644
--- 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_request_t *r)
}
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
index 3bb73cce1..317cf2459 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.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
index 4aa1be8ed..5bb6bb7cf 100644
--- 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_request_t *r, ngx_buf_t *b)
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_request_t *r, ngx_buf_t *b)
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
index 57128a361..d60384fe1 100644
--- 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 *r, ngx_uint_t flags)
}
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
index add5b21d9..cc303b431 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2888,7 +2888,7 @@ ngx_http_upstream_finalize_request(ngx_http_request_t *r,
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);
}