]> git.kaiwu.me - nginx.git/commitdiff
nginx-0.3.35-RELEASE import release-0.3.35
authorIgor Sysoev <igor@sysoev.ru>
Tue, 28 Mar 2006 12:24:47 +0000 (12:24 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 28 Mar 2006 12:24:47 +0000 (12:24 +0000)
    *) Bugfix: the accept-filter and the TCP_DEFER_ACCEPT option were set
       for first "listen" directive only; the bug had appeared in 0.3.31.

    *) Bugfix: in the "proxy_pass" directive without the URI part in a
       subrequest.

docs/xml/nginx/changes.xml
src/core/nginx.h
src/core/ngx_connection.c
src/http/modules/ngx_http_proxy_module.c
src/os/unix/ngx_readv_chain.c
src/os/unix/ngx_recv.c

index eb034be117968930abd57847f6ff68775a0234e3..a110b37f5ee9c207eaf7dcb704b0a4a4786734d6 100644 (file)
@@ -9,6 +9,33 @@
 <title lang="en">nginx changelog</title>
 
 
+<changes ver="0.3.35" date="22.03.2006">
+
+<change type="bugfix">
+<para lang="ru">
+accept-ÆÉÌØÔÒ É TCP_DEFER_ACCEPT ÕÓÔÁÎÁ×ÌÉ×ÁÌÉÓØ ÔÏÌØËÏ ÄÌÑ ÐÅÒ×ÏÊ
+ÄÉÒÅËÔÉ×Ù listen;
+ÏÛÉÂËÁ ÐÏÑ×ÉÌÁÓØ × 0.3.31.
+</para>
+<para lang="en">
+the accept-filter and the TCP_DEFER_ACCEPT option were set for first "listen"
+directive only;
+bug appeared in 0.3.31.
+</para>
+</change>
+
+<change type="bugfix">
+<para lang="ru">
+× ÄÉÒÅËÔÉ×Å proxy_pass ÂÅÚ URI ÐÒÉ ÉÓÐÏÌØÚÏ×ÁÎÉÉ × ÐÏÄÚÁÐÒÏÓÅ.
+</para>
+<para lang="en">
+in the "proxy_pass" directive without the URI part in a subrequest.
+</para>
+</change>
+
+</changes>
+
+
 <changes ver="0.3.34" date="21.03.2006">
 
 <change type="feature">
index ebd959d440b41316f1d883e7bbf65bf0b0028075..46d0a3dd42b775c76e550841773208ed84179d8a 100644 (file)
@@ -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"
index abc006f0cfff4490678c3b2840391761c9cf800f..8dbabc206095f19991f287669866213608f974c1 100644 (file)
@@ -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
index e8d3107533ce63d02206ed492a5a5aa463878143..f8dfdc4e144c685619a26b1af15077ed66e3811f 100644 (file)
@@ -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;
index 2e621d8bb666218e0d430582e5cb50379e163c71..f2dd82c89c5b31bdaf38dab710ceb627cd678104 100644 (file)
@@ -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;
index f38730ec3452bf009fc30f77a03516cf9ce64169..db9a834504faa18c1ddadcde67c5520754b85a38 100644 (file)
@@ -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;