diff options
author | Igor Sysoev <igor@sysoev.ru> | 2006-03-22 16:03:53 +0000 |
---|---|---|
committer | Jonathan Kolb <jon@b0g.us> | 2006-03-22 16:03:53 +0000 |
commit | 35ff24bd91545a9fb68d11a332096e3a0f952927 (patch) | |
tree | e8b65afa6cd91fc067de2339a741e81cb3e18f5a | |
parent | 437664267d265bc54e9c2e8f0da138a11bc6a9c8 (diff) | |
download | nginx-35ff24bd91545a9fb68d11a332096e3a0f952927.tar.gz |
Changes with nginx 0.3.35 22 Mar 2006v0.3.35
*) Bugfix: the accept-filter and the TCP_DEFER_ACCEPT option were set
for first "listen" directive only; bug appeared in 0.3.31.
*) Bugfix: in the "proxy_pass" directive without the URI part in a
subrequest.
-rw-r--r-- | CHANGES | 9 | ||||
-rw-r--r-- | CHANGES.ru | 9 | ||||
-rw-r--r-- | src/core/nginx.h | 2 | ||||
-rw-r--r-- | src/core/ngx_connection.c | 37 | ||||
-rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 3 | ||||
-rw-r--r-- | src/os/unix/ngx_readv_chain.c | 2 | ||||
-rw-r--r-- | src/os/unix/ngx_recv.c | 2 |
7 files changed, 44 insertions, 20 deletions
@@ -1,4 +1,13 @@ +Changes with nginx 0.3.35 22 Mar 2006 + + *) Bugfix: the accept-filter and the TCP_DEFER_ACCEPT option were set + for first "listen" directive only; bug appeared in 0.3.31. + + *) Bugfix: in the "proxy_pass" directive without the URI part in a + subrequest. + + Changes with nginx 0.3.34 21 Mar 2006 *) Feature: the "add_header" directive supports the variables. diff --git a/CHANGES.ru b/CHANGES.ru index 012065570..9939a29fc 100644 --- a/CHANGES.ru +++ b/CHANGES.ru @@ -1,4 +1,13 @@ +Изменения в nginx 0.3.35 22.03.2006 + + *) Исправление: accept-фильтр и TCP_DEFER_ACCEPT устанавливались только + для первой директивы listen; ошибка появилась в 0.3.31. + + *) Исправление: в директиве proxy_pass без URI при использовании в + подзапросе. + + Изменения в nginx 0.3.34 21.03.2006 *) Добавление: директива add_header поддерживает переменные. diff --git a/src/core/nginx.h b/src/core/nginx.h index ebd959d44..46d0a3dd4 100644 --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,7 +8,7 @@ #define _NGINX_H_INCLUDED_ -#define NGINX_VER "nginx/0.3.34" +#define NGINX_VER "nginx/0.3.35" #define NGINX_VAR "NGINX" #define NGX_OLDPID_EXT ".oldbin" diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c index abc006f0c..8dbabc206 100644 --- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c @@ -404,74 +404,75 @@ ngx_configure_listening_socket(ngx_cycle_t *cycle) #ifdef SO_ACCEPTFILTER - if (ls->delete_deferred) { - if (setsockopt(ls->fd, SOL_SOCKET, SO_ACCEPTFILTER, NULL, 0) == -1) + if (ls[i].delete_deferred) { + if (setsockopt(ls[i].fd, SOL_SOCKET, SO_ACCEPTFILTER, NULL, 0) + == -1) { ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, "setsockopt(SO_ACCEPTFILTER, NULL) " "for %V failed, ignored", - &ls->addr_text); + &ls[i].addr_text); - if (ls->accept_filter) { + if (ls[i].accept_filter) { ngx_log_error(NGX_LOG_ALERT, cycle->log, 0, "could not change the accept filter " "to \"%s\" for %V, ignored", - ls->accept_filter, &ls->addr_text); + ls[i].accept_filter, &ls[i].addr_text); } continue; } - ls->deferred_accept = 0; + ls[i].deferred_accept = 0; } - if (ls->add_deferred) { + if (ls[i].add_deferred) { ngx_memzero(&af, sizeof(struct accept_filter_arg)); (void) ngx_cpystrn((u_char *) af.af_name, - (u_char *) ls->accept_filter, 16); + (u_char *) ls[i].accept_filter, 16); - if (setsockopt(ls->fd, SOL_SOCKET, SO_ACCEPTFILTER, + if (setsockopt(ls[i].fd, SOL_SOCKET, SO_ACCEPTFILTER, &af, sizeof(struct accept_filter_arg)) == -1) { ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, "setsockopt(SO_ACCEPTFILTER, \"%s\") " " for %V failed, ignored", - ls->accept_filter, &ls->addr_text); + ls[i].accept_filter, &ls[i].addr_text); continue; } - ls->deferred_accept = 1; + ls[i].deferred_accept = 1; } #endif #ifdef TCP_DEFER_ACCEPT - if (ls->add_deferred || ls->delete_deferred) { + if (ls[i].add_deferred || ls[i].delete_deferred) { - if (ls->add_deferred) { - timeout = (int) (ls->post_accept_timeout / 1000); + if (ls[i].add_deferred) { + timeout = (int) (ls[i].post_accept_timeout / 1000); } else { timeout = 0; } - if (setsockopt(ls->fd, IPPROTO_TCP, TCP_DEFER_ACCEPT, + if (setsockopt(ls[i].fd, IPPROTO_TCP, TCP_DEFER_ACCEPT, &timeout, sizeof(int)) == -1) { ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, "setsockopt(TCP_DEFER_ACCEPT, %d) for %V failed, " "ignored", - timeout, &ls->addr_text); + timeout, &ls[i].addr_text); continue; } } - if (ls->add_deferred) { - ls->deferred_accept = 1; + if (ls[i].add_deferred) { + ls[i].deferred_accept = 1; } #endif diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index e8d310753..f8dfdc4e1 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -487,7 +487,8 @@ ngx_http_proxy_create_request(ngx_http_request_t *r) escape = 0; - loc_len = r->valid_location ? u->conf->location.len : 0; + loc_len = (r->valid_location && u->conf->uri.len) ? u->conf->location.len: + 0; if (u->conf->uri.len == 0 && r->valid_unparsed_uri && r == r->main) { unparsed_uri = 1; diff --git a/src/os/unix/ngx_readv_chain.c b/src/os/unix/ngx_readv_chain.c index 2e621d8bb..f2dd82c89 100644 --- a/src/os/unix/ngx_readv_chain.c +++ b/src/os/unix/ngx_readv_chain.c @@ -118,9 +118,11 @@ ngx_readv_chain(ngx_connection_t *c, ngx_chain_t *chain) * even if kqueue reported about available data */ +#if 0 ngx_log_error(NGX_LOG_ALERT, c->log, 0, "readv() returned 0 while kevent() reported " "%d available bytes", rev->available); +#endif rev->eof = 1; rev->available = 0; diff --git a/src/os/unix/ngx_recv.c b/src/os/unix/ngx_recv.c index f38730ec3..db9a83450 100644 --- a/src/os/unix/ngx_recv.c +++ b/src/os/unix/ngx_recv.c @@ -77,9 +77,11 @@ ssize_t ngx_unix_recv(ngx_connection_t *c, u_char *buf, size_t size) * even if kqueue reported about available data */ +#if 0 ngx_log_error(NGX_LOG_ALERT, c->log, 0, "recv() returned 0 while kevent() reported " "%d available bytes", rev->available); +#endif rev->eof = 1; rev->available = 0; |