changeset 552:43e02819c5cf NGINX_0_8_28

nginx 0.8.28 *) Bugfix: nginx could not be built with the --without-pcre parameter; the bug had appeared in 0.8.25.
author Igor Sysoev <http://sysoev.ru>
date Mon, 23 Nov 2009 00:00:00 +0300
parents 8af5b52635d0
children 63dde5a94756
files CHANGES CHANGES.ru src/core/nginx.h src/core/ngx_connection.c src/event/modules/ngx_poll_module.c src/event/modules/ngx_select_module.c src/event/modules/ngx_win32_select_module.c src/event/ngx_event_openssl.c src/http/modules/perl/nginx.pm src/http/ngx_http_variables.c src/http/ngx_http_variables.h src/os/unix/ngx_process.c src/os/unix/ngx_process_cycle.c src/os/unix/ngx_process_cycle.h
diffstat 14 files changed, 53 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES	Tue Nov 17 00:00:00 2009 +0300
+++ b/CHANGES	Mon Nov 23 00:00:00 2009 +0300
@@ -1,8 +1,14 @@
 
+Changes with nginx 0.8.28                                        23 Nov 2009
+
+    *) Bugfix: nginx could not be built with the --without-pcre parameter; 
+       the bug had appeared in 0.8.25.
+
+
 Changes with nginx 0.8.27                                        17 Nov 2009
 
-    *) Bugfix: regular expressions did work in nginx/Windows; the bug had 
-       appeared in 0.8.25.
+    *) Bugfix: regular expressions did not work in nginx/Windows; the bug 
+       had appeared in 0.8.25.
 
 
 Changes with nginx 0.8.26                                        16 Nov 2009
--- a/CHANGES.ru	Tue Nov 17 00:00:00 2009 +0300
+++ b/CHANGES.ru	Mon Nov 23 00:00:00 2009 +0300
@@ -1,4 +1,10 @@
 
+Изменения в nginx 0.8.28                                          23.11.2009
+
+    *) Исправление: nginx не собирался с параметром --without-pcre; ошибка 
+       появилась в 0.8.25.
+
+
 Изменения в nginx 0.8.27                                          17.11.2009
 
     *) Исправление: регулярные выражения не работали в nginx/Windows; 
--- a/src/core/nginx.h	Tue Nov 17 00:00:00 2009 +0300
+++ b/src/core/nginx.h	Mon Nov 23 00:00:00 2009 +0300
@@ -8,8 +8,8 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define nginx_version         8027
-#define NGINX_VERSION      "0.8.27"
+#define nginx_version         8028
+#define NGINX_VERSION      "0.8.28"
 #define NGINX_VER          "nginx/" NGINX_VERSION
 
 #define NGINX_VAR          "NGINX"
--- a/src/core/ngx_connection.c	Tue Nov 17 00:00:00 2009 +0300
+++ b/src/core/ngx_connection.c	Mon Nov 23 00:00:00 2009 +0300
@@ -634,7 +634,7 @@
 #if (NGX_HAVE_UNIX_DOMAIN)
 
         if (ls[i].sockaddr->sa_family == AF_UNIX
-            && ngx_process != NGX_PROCESS_WORKER
+            && ngx_process <= NGX_PROCESS_MASTER
             && ngx_new_binary == 0)
         {
             u_char *name = ls[i].addr_text.data + sizeof("unix:") - 1;
--- a/src/event/modules/ngx_poll_module.c	Tue Nov 17 00:00:00 2009 +0300
+++ b/src/event/modules/ngx_poll_module.c	Mon Nov 23 00:00:00 2009 +0300
@@ -72,7 +72,7 @@
         nevents = 0;
     }
 
-    if (ngx_process == NGX_PROCESS_WORKER
+    if (ngx_process >= NGX_PROCESS_WORKER
         || cycle->old_cycle == NULL
         || cycle->old_cycle->connection_n < cycle->connection_n)
     {
--- a/src/event/modules/ngx_select_module.c	Tue Nov 17 00:00:00 2009 +0300
+++ b/src/event/modules/ngx_select_module.c	Mon Nov 23 00:00:00 2009 +0300
@@ -81,7 +81,7 @@
         nevents = 0;
     }
 
-    if (ngx_process == NGX_PROCESS_WORKER
+    if (ngx_process >= NGX_PROCESS_WORKER
         || cycle->old_cycle == NULL
         || cycle->old_cycle->connection_n < cycle->connection_n)
     {
--- a/src/event/modules/ngx_win32_select_module.c	Tue Nov 17 00:00:00 2009 +0300
+++ b/src/event/modules/ngx_win32_select_module.c	Mon Nov 23 00:00:00 2009 +0300
@@ -82,7 +82,7 @@
         nevents = 0;
     }
 
-    if (ngx_process == NGX_PROCESS_WORKER
+    if (ngx_process >= NGX_PROCESS_WORKER
         || cycle->old_cycle == NULL
         || cycle->old_cycle->connection_n < cycle->connection_n)
     {
--- a/src/event/ngx_event_openssl.c	Tue Nov 17 00:00:00 2009 +0300
+++ b/src/event/ngx_event_openssl.c	Mon Nov 23 00:00:00 2009 +0300
@@ -1312,6 +1312,7 @@
             || n == SSL_R_NO_SHARED_CIPHER                           /*  193 */
             || n == SSL_R_UNEXPECTED_MESSAGE                         /*  244 */
             || n == SSL_R_UNEXPECTED_RECORD                          /*  245 */
+            || n == SSL_R_UNKNOWN_PROTOCOL                           /*  252 */
             || n == SSL_R_WRONG_VERSION_NUMBER                       /*  267 */
             || n == SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC        /*  281 */
             || n == 1000 /* SSL_R_SSLV3_ALERT_CLOSE_NOTIFY */
--- a/src/http/modules/perl/nginx.pm	Tue Nov 17 00:00:00 2009 +0300
+++ b/src/http/modules/perl/nginx.pm	Mon Nov 23 00:00:00 2009 +0300
@@ -47,7 +47,7 @@
     HTTP_INSUFFICIENT_STORAGE
 );
 
-our $VERSION = '0.8.27';
+our $VERSION = '0.8.28';
 
 require XSLoader;
 XSLoader::load('nginx', $VERSION);
--- a/src/http/ngx_http_variables.c	Tue Nov 17 00:00:00 2009 +0300
+++ b/src/http/ngx_http_variables.c	Mon Nov 23 00:00:00 2009 +0300
@@ -1666,6 +1666,8 @@
 }
 
 
+#if (NGX_PCRE)
+
 static ngx_int_t
 ngx_http_variable_not_found(ngx_http_request_t *r, ngx_http_variable_value_t *v,
     uintptr_t data)
@@ -1816,6 +1818,8 @@
     return NGX_OK;
 }
 
+#endif
+
 
 ngx_int_t
 ngx_http_variables_add_core_vars(ngx_conf_t *cf)
--- a/src/http/ngx_http_variables.h	Tue Nov 17 00:00:00 2009 +0300
+++ b/src/http/ngx_http_variables.h	Mon Nov 23 00:00:00 2009 +0300
@@ -41,21 +41,6 @@
 };
 
 
-typedef struct {
-    ngx_uint_t                    capture;
-    ngx_int_t                     index;
-} ngx_http_regex_variable_t;
-
-
-typedef struct {
-    ngx_regex_t                  *regex;
-    ngx_uint_t                    ncaptures;
-    ngx_http_regex_variable_t    *variables;
-    ngx_uint_t                    nvariables;
-    ngx_str_t                     name;
-} ngx_http_regex_t;
-
-
 ngx_http_variable_t *ngx_http_add_variable(ngx_conf_t *cf, ngx_str_t *name,
     ngx_uint_t flags);
 ngx_int_t ngx_http_get_variable_index(ngx_conf_t *cf, ngx_str_t *name);
@@ -74,11 +59,30 @@
 #define ngx_http_clear_variable(r, index) r->variables0[index].text.data = NULL;
 
 
+#if (NGX_PCRE)
+
+typedef struct {
+    ngx_uint_t                    capture;
+    ngx_int_t                     index;
+} ngx_http_regex_variable_t;
+
+
+typedef struct {
+    ngx_regex_t                  *regex;
+    ngx_uint_t                    ncaptures;
+    ngx_http_regex_variable_t    *variables;
+    ngx_uint_t                    nvariables;
+    ngx_str_t                     name;
+} ngx_http_regex_t;
+
+
 ngx_http_regex_t *ngx_http_regex_compile(ngx_conf_t *cf,
     ngx_regex_compile_t *rc);
 ngx_int_t ngx_http_regex_exec(ngx_http_request_t *r, ngx_http_regex_t *re,
     ngx_str_t *s);
 
+#endif
+
 
 ngx_int_t ngx_http_variables_add_core_vars(ngx_conf_t *cf);
 ngx_int_t ngx_http_variables_init_vars(ngx_conf_t *cf);
--- a/src/os/unix/ngx_process.c	Tue Nov 17 00:00:00 2009 +0300
+++ b/src/os/unix/ngx_process.c	Mon Nov 23 00:00:00 2009 +0300
@@ -388,6 +388,7 @@
         break;
 
     case NGX_PROCESS_WORKER:
+    case NGX_PROCESS_HELPER:
         switch (signo) {
 
         case ngx_signal_value(NGX_NOACCEPT_SIGNAL):
--- a/src/os/unix/ngx_process_cycle.c	Tue Nov 17 00:00:00 2009 +0300
+++ b/src/os/unix/ngx_process_cycle.c	Mon Nov 23 00:00:00 2009 +0300
@@ -714,6 +714,8 @@
     ngx_uint_t         i;
     ngx_connection_t  *c;
 
+    ngx_process = NGX_PROCESS_WORKER;
+
     ngx_worker_process_init(cycle, 1);
 
     ngx_setproctitle("worker process");
@@ -829,8 +831,6 @@
     ngx_core_conf_t  *ccf;
     ngx_listening_t  *ls;
 
-    ngx_process = NGX_PROCESS_WORKER;
-
     if (ngx_set_environment(cycle, NULL) == NULL) {
         /* fatal */
         exit(2);
@@ -1289,6 +1289,8 @@
 
     cycle->connection_n = 512;
 
+    ngx_process = NGX_PROCESS_HELPER;
+
     ngx_worker_process_init(cycle, 0);
 
     ngx_close_listening_sockets(cycle);
--- a/src/os/unix/ngx_process_cycle.h	Tue Nov 17 00:00:00 2009 +0300
+++ b/src/os/unix/ngx_process_cycle.h	Mon Nov 23 00:00:00 2009 +0300
@@ -21,8 +21,9 @@
 
 #define NGX_PROCESS_SINGLE     0
 #define NGX_PROCESS_MASTER     1
-#define NGX_PROCESS_WORKER     2
-#define NGX_PROCESS_SIGNALLER  3
+#define NGX_PROCESS_SIGNALLER  2
+#define NGX_PROCESS_WORKER     3
+#define NGX_PROCESS_HELPER     4
 
 
 typedef struct {