diff options
author | Igor Sysoev <igor@sysoev.ru> | 2005-06-07 19:56:31 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2005-06-07 19:56:31 +0400 |
commit | 7b190b41b0d9885e523f3efd9efcbf94b6abe961 (patch) | |
tree | 4a5e4edda3e4a287a4343e341df38b9c7495ee82 /src/core | |
parent | 3c8b02a267b310fb0926ee3c63196f976720e113 (diff) |
nginx-0.1.35-RELEASE importrelease-0.1.35
*) Feature: the "working_directory" directive.
*) Feature: the "port_in_redirect" directive.
*) Bugfix: the segmentation fault was occurred if the backend response
header was in several packets; the bug had appeared in 0.1.29.
*) Bugfix: if more than 10 servers were configured or some server did
not use the "listen" directive, then the segmentation fault was
occurred on the start.
*) Bugfix: the segmentation fault might occur if the response was
bigger than the temporary file.
*) Bugfix: nginx returned the 400 response on requests like
"GET http://www.domain.com/uri HTTP/1.0"; the bug had appeared in
0.1.28.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/nginx.c | 7 | ||||
-rw-r--r-- | src/core/nginx.h | 2 | ||||
-rw-r--r-- | src/core/ngx_connection.c | 20 | ||||
-rw-r--r-- | src/core/ngx_connection.h | 3 | ||||
-rw-r--r-- | src/core/ngx_cycle.h | 2 | ||||
-rw-r--r-- | src/core/ngx_string.c | 22 | ||||
-rw-r--r-- | src/core/ngx_string.h | 1 |
7 files changed, 46 insertions, 11 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c index 7b98e1263..4a01acdd0 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -95,6 +95,13 @@ static ngx_command_t ngx_core_commands[] = { offsetof(ngx_core_conf_t, pid), NULL }, + { ngx_string("working_directory"), + NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1, + ngx_conf_set_str_slot, + 0, + offsetof(ngx_core_conf_t, working_directory), + NULL }, + ngx_null_command }; diff --git a/src/core/nginx.h b/src/core/nginx.h index 1a08c424f..94b6da3e0 100644 --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,7 +8,7 @@ #define _NGINX_H_INCLUDED_ -#define NGINX_VER "nginx/0.1.34" +#define NGINX_VER "nginx/0.1.35" #define NGINX_VAR "NGINX" #define NGX_NEWPID_EXT ".newbin" diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c index 4268157bd..ff9c16457 100644 --- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c @@ -12,9 +12,8 @@ ngx_os_io_t ngx_io; -ngx_listening_t *ngx_listening_inet_stream_socket(ngx_conf_t *cf, - in_addr_t addr, - in_port_t port) +ngx_listening_t * +ngx_listening_inet_stream_socket(ngx_conf_t *cf, in_addr_t addr, in_port_t port) { size_t len; ngx_listening_t *ls; @@ -60,7 +59,8 @@ ngx_listening_t *ngx_listening_inet_stream_socket(ngx_conf_t *cf, } -ngx_int_t ngx_set_inherited_sockets(ngx_cycle_t *cycle) +ngx_int_t +ngx_set_inherited_sockets(ngx_cycle_t *cycle) { size_t len; ngx_uint_t i; @@ -121,7 +121,8 @@ ngx_int_t ngx_set_inherited_sockets(ngx_cycle_t *cycle) } -ngx_int_t ngx_open_listening_sockets(ngx_cycle_t *cycle) +ngx_int_t +ngx_open_listening_sockets(ngx_cycle_t *cycle) { ngx_uint_t tries, failed, reuseaddr, i; ngx_err_t err; @@ -261,7 +262,8 @@ ngx_int_t ngx_open_listening_sockets(ngx_cycle_t *cycle) } -void ngx_close_listening_sockets(ngx_cycle_t *cycle) +void +ngx_close_listening_sockets(ngx_cycle_t *cycle) { ngx_uint_t i; ngx_socket_t fd; @@ -309,7 +311,8 @@ void ngx_close_listening_sockets(ngx_cycle_t *cycle) } -void ngx_close_connection(ngx_connection_t *c) +void +ngx_close_connection(ngx_connection_t *c) { ngx_socket_t fd; @@ -398,7 +401,8 @@ void ngx_close_connection(ngx_connection_t *c) } -ngx_int_t ngx_connection_error(ngx_connection_t *c, ngx_err_t err, char *text) +ngx_int_t +ngx_connection_error(ngx_connection_t *c, ngx_err_t err, char *text) { ngx_uint_t level; diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h index bbca32ba6..8fb67057c 100644 --- a/src/core/ngx_connection.h +++ b/src/core/ngx_connection.h @@ -144,8 +144,7 @@ struct ngx_connection_s { ngx_listening_t *ngx_listening_inet_stream_socket(ngx_conf_t *cf, - in_addr_t addr, - in_port_t port); + in_addr_t addr, in_port_t port); ngx_int_t ngx_set_inherited_sockets(ngx_cycle_t *cycle); ngx_int_t ngx_open_listening_sockets(ngx_cycle_t *cycle); void ngx_close_listening_sockets(ngx_cycle_t *cycle); diff --git a/src/core/ngx_cycle.h b/src/core/ngx_cycle.h index b1b53482b..6ed753a93 100644 --- a/src/core/ngx_cycle.h +++ b/src/core/ngx_cycle.h @@ -57,6 +57,8 @@ typedef struct { ngx_uid_t user; ngx_gid_t group; + ngx_str_t working_directory; + ngx_str_t pid; ngx_str_t newpid; diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c index 0307bb1cd..acc4bd302 100644 --- a/src/core/ngx_string.c +++ b/src/core/ngx_string.c @@ -792,8 +792,30 @@ ngx_escape_uri(u_char *dst, u_char *src, size_t size, ngx_uint_t type) 0xffffffff, /* 1111 1111 1111 1111 1111 1111 1111 1111 */ 0xffffffff /* 1111 1111 1111 1111 1111 1111 1111 1111 */ }; + /* " ", """, "%", "'", %00-%1F, %7F-%FF */ + + static uint32_t utf[] = + { 0xffffffff, /* 1111 1111 1111 1111 1111 1111 1111 1111 */ + + /* ?>=< ;:98 7654 3210 /.-, +*)( '&%$ #"! */ + 0x800000ad, /* 0000 0000 0000 0000 0000 0000 1010 1101 */ + + /* _^]\ [ZYX WVUT SRQP ONML KJIH GFED CBA@ */ + 0x00000000, /* 0000 0000 0000 0000 0000 0000 0000 0000 */ + + /* ~}| {zyx wvut srqp onml kjih gfed cba` */ + 0x80000000, /* 1000 0000 0000 0000 0000 0000 0000 0000 */ + + 0x00000000, /* 0000 0000 0000 0000 0000 0000 0000 0000 */ + 0x00000000, /* 0000 0000 0000 0000 0000 0000 0000 0000 */ + 0x00000000, /* 0000 0000 0000 0000 0000 0000 0000 0000 */ + 0x00000000 /* 0000 0000 0000 0000 0000 0000 0000 0000 */ }; + switch (type) { + case NGX_ESCAPE_UTF: + escape = utf; + break; case NGX_ESCAPE_HTML: escape = html; break; diff --git a/src/core/ngx_string.h b/src/core/ngx_string.h index c72a776dc..e2e20e1f3 100644 --- a/src/core/ngx_string.h +++ b/src/core/ngx_string.h @@ -100,6 +100,7 @@ ngx_int_t ngx_decode_base64(ngx_str_t *dst, ngx_str_t *src); #define NGX_ESCAPE_URI 0 #define NGX_ESCAPE_ARGS 1 #define NGX_ESCAPE_HTML 2 +#define NGX_ESCAPE_UTF 3 uintptr_t ngx_escape_uri(u_char *dst, u_char *src, size_t size, ngx_uint_t type); |