Permalink
Browse files

Changes with nginx 1.1.7 31 Oct 2011

*) Feature: support of several resolvers in the "resolver" directive.
Thanks to Kirill A. Korinskiy.

*) Bugfix: a segmentation fault occurred on start or while
reconfiguration if the "ssl" directive was used at http level and
there was no "ssl_certificate" defined.

*) Bugfix: reduced memory consumption while proxying of big files if
they were buffered to disk.

*) Bugfix: a segmentation fault might occur in a worker process if
"proxy_http_version 1.1" directive was used.

*) Bugfix: in the "expires @time" directive.
  • Loading branch information...
1 parent ab0a95d commit 156a15693d0135dc47addb295c1519cf9d29abf9 @igorsysoev igorsysoev committed with kolbyjack Oct 31, 2011
View
18 CHANGES
@@ -1,4 +1,22 @@
+Changes with nginx 1.1.7 31 Oct 2011
+
+ *) Feature: support of several resolvers in the "resolver" directive.
+ Thanks to Kirill A. Korinskiy.
+
+ *) Bugfix: a segmentation fault occurred on start or while
+ reconfiguration if the "ssl" directive was used at http level and
+ there was no "ssl_certificate" defined.
+
+ *) Bugfix: reduced memory consumption while proxying of big files if
+ they were buffered to disk.
+
+ *) Bugfix: a segmentation fault might occur in a worker process if
+ "proxy_http_version 1.1" directive was used.
+
+ *) Bugfix: in the "expires @time" directive.
+
+
Changes with nginx 1.1.6 17 Oct 2011
*) Change in internal API: now module context data are cleared while
View
@@ -1,4 +1,22 @@
+Изменения в nginx 1.1.7 31.10.2011
+
+ *) Добавление: поддержка нескольких DNS серверов в директиве "resolver".
+ Спасибо Кириллу Коринскому.
+
+ *) Исправление: на старте или во время переконфигурации происходил
+ segmentation fault, если директива ssl использовалась на уровне http
+ и не был указан ssl_certificate.
+
+ *) Исправление: уменьшено потребление памяти при проксировании больших
+ файлов, если они буферизировались на диск.
+
+ *) Исправление: в рабочем процессе мог произойти segmentation fault,
+ если использовалась директива "proxy_http_version 1.1".
+
+ *) Исправление: в директиве "expires @time".
+
+
Изменения в nginx 1.1.6 17.10.2011
*) Изменение во внутреннем API: теперь при внутреннем редиректе в
View
3 README
@@ -1,4 +1,3 @@
-The Russian documentation is available at http://sysoev.ru/nginx/
-The English documentation is available at http://nginx.net
+Documentation is available at http://nginx.org
View
@@ -25,6 +25,13 @@ fi
if [ "$CC" = cl ]; then
if `$NGX_WINE $CC -v 2>&1 \
+ | grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16' \
+ >/dev/null 2>&1`; then
+
+ NGX_CC_NAME=msvc10
+ echo " + using Microsoft Visual C++ 10 compiler"
+
+ else if `$NGX_WINE $CC -v 2>&1 \
| grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14' \
>/dev/null 2>&1`; then
@@ -43,6 +50,7 @@ if [ "$CC" = cl ]; then
echo " + using Microsoft Visual C++ compiler"
fi
fi
+ fi
else
if [ "$CC" = wcl386 ]; then
View
@@ -306,30 +306,30 @@ if [ $help = yes ]; then
cat << END
- --help this message
+ --help print this message
- --prefix=PATH set the installation prefix
- --sbin-path=PATH set path to the nginx binary file
- --conf-path=PATH set path to the nginx.conf file
- --error-log-path=PATH set path to the error log
- --pid-path=PATH set path to nginx.pid file
- --lock-path=PATH set path to nginx.lock file
+ --prefix=PATH set installation prefix
+ --sbin-path=PATH set nginx binary pathname
+ --conf-path=PATH set nginx.conf pathname
+ --error-log-path=PATH set error log pathname
+ --pid-path=PATH set nginx.pid pathname
+ --lock-path=PATH set nginx.lock pathname
- --user=USER set non-privilege user
- for the worker processes
- --group=GROUP set non-privilege group
- for the worker processes
+ --user=USER set non-privileged user for
+ worker processes
+ --group=GROUP set non-privileged group for
+ worker processes
- --builddir=DIR set the build directory
+ --builddir=DIR set build directory
--with-rtsig_module enable rtsig module
--with-select_module enable select module
--without-select_module disable select module
--with-poll_module enable poll module
--without-poll_module disable poll module
- --with-file-aio enable file aio support
- --with-ipv6 enable ipv6 support
+ --with-file-aio enable file AIO support
+ --with-ipv6 enable IPv6 support
--with-http_ssl_module enable ngx_http_ssl_module
--with-http_realip_module enable ngx_http_realip_module
@@ -372,17 +372,20 @@ cat << END
disable ngx_http_upstream_ip_hash_module
--with-http_perl_module enable ngx_http_perl_module
- --with-perl_modules_path=PATH set path to the perl modules
- --with-perl=PATH set path to the perl binary
-
- --http-log-path=PATH set path to the http access log
- --http-client-body-temp-path=PATH set path to the http client request body
- temporary files
- --http-proxy-temp-path=PATH set path to the http proxy temporary files
- --http-fastcgi-temp-path=PATH set path to the http fastcgi temporary
- files
- --http-uwsgi-temp-path=PATH set path to the http uwsgi temporary files
- --http-scgi-temp-path=PATH set path to the http scgi temporary files
+ --with-perl_modules_path=PATH set Perl modules path
+ --with-perl=PATH set perl binary pathname
+
+ --http-log-path=PATH set http access log pathname
+ --http-client-body-temp-path=PATH set path to store
+ http client request body temporary files
+ --http-proxy-temp-path=PATH set path to store
+ http proxy temporary files
+ --http-fastcgi-temp-path=PATH set path to store
+ http fastcgi temporary files
+ --http-uwsgi-temp-path=PATH set path to store
+ http uwsgi temporary files
+ --http-scgi-temp-path=PATH set path to store
+ http scgi temporary files
--without-http disable HTTP server
--without-http-cache disable HTTP cache
@@ -398,40 +401,40 @@ cat << END
--add-module=PATH enable an external module
- --with-cc=PATH set path to C compiler
- --with-cpp=PATH set path to C preprocessor
- --with-cc-opt=OPTIONS set additional options for C compiler
- --with-ld-opt=OPTIONS set additional options for linker
- --with-cpu-opt=CPU build for specified CPU, the valid values:
+ --with-cc=PATH set C compiler pathname
+ --with-cpp=PATH set C preprocessor pathname
+ --with-cc-opt=OPTIONS set additional C compiler options
+ --with-ld-opt=OPTIONS set additional linker options
+ --with-cpu-opt=CPU build for the specified CPU, valid values:
pentium, pentiumpro, pentium3, pentium4,
athlon, opteron, sparc32, sparc64, ppc64
--without-pcre disable PCRE library usage
--with-pcre force PCRE library usage
--with-pcre=DIR set path to PCRE library sources
- --with-pcre-opt=OPTIONS set additional options for PCRE building
+ --with-pcre-opt=OPTIONS set additional build options for PCRE
--with-md5=DIR set path to md5 library sources
- --with-md5-opt=OPTIONS set additional options for md5 building
+ --with-md5-opt=OPTIONS set additional build options for md5
--with-md5-asm use md5 assembler sources
--with-sha1=DIR set path to sha1 library sources
- --with-sha1-opt=OPTIONS set additional options for sha1 building
+ --with-sha1-opt=OPTIONS set additional build options for sha1
--with-sha1-asm use sha1 assembler sources
--with-zlib=DIR set path to zlib library sources
- --with-zlib-opt=OPTIONS set additional options for zlib building
+ --with-zlib-opt=OPTIONS set additional build options for zlib
--with-zlib-asm=CPU use zlib assembler sources optimized
- for specified CPU, the valid values:
+ for the specified CPU, valid values:
pentium, pentiumpro
--with-libatomic force libatomic_ops library usage
--with-libatomic=DIR set path to libatomic_ops library sources
--with-openssl=DIR set path to OpenSSL library sources
- --with-openssl-opt=OPTIONS set additional options for OpenSSL building
+ --with-openssl-opt=OPTIONS set additional build options for OpenSSL
- --with-debug enable the debugging logging
+ --with-debug enable debug logging
END
View
@@ -62,13 +62,15 @@ types {
audio/midi mid midi kar;
audio/mpeg mp3;
audio/ogg ogg;
+ audio/x-m4a m4a;
audio/x-realaudio ra;
video/3gpp 3gpp 3gp;
video/mp4 mp4;
video/mpeg mpeg mpg;
video/quicktime mov;
video/x-flv flv;
+ video/x-m4v m4v;
video/x-mng mng;
video/x-ms-asf asx asf;
video/x-ms-wmv wmv;
View
@@ -203,6 +203,8 @@ main(int argc, char *const *argv)
ngx_cycle_t *cycle, init_cycle;
ngx_core_conf_t *ccf;
+ ngx_debug_init();
+
if (ngx_strerror_init() != NGX_OK) {
return 1;
}
@@ -260,10 +262,6 @@ main(int argc, char *const *argv)
}
}
-#if (NGX_FREEBSD)
- ngx_debug_init();
-#endif
-
/* TODO */ ngx_max_sockets = -1;
ngx_time_init();
View
@@ -8,8 +8,8 @@
#define _NGINX_H_INCLUDED_
-#define nginx_version 1001006
-#define NGINX_VERSION "1.1.6"
+#define nginx_version 1001007
+#define NGINX_VERSION "1.1.7"
#define NGINX_VER "nginx/" NGINX_VERSION
#define NGINX_VAR "NGINX"
View
@@ -671,7 +671,7 @@ ngx_parse_inet_url(ngx_pool_t *pool, ngx_url_t *u)
n = ngx_atoi(port, len);
- if (n < 1 || n > 65536) {
+ if (n < 1 || n > 65535) {
u->err = "invalid port";
return NGX_ERROR;
}
@@ -695,7 +695,7 @@ ngx_parse_inet_url(ngx_pool_t *pool, ngx_url_t *u)
if (n != NGX_ERROR) {
- if (n < 1 || n > 65536) {
+ if (n < 1 || n > 65535) {
u->err = "invalid port";
return NGX_ERROR;
}
@@ -835,7 +835,7 @@ ngx_parse_inet6_url(ngx_pool_t *pool, ngx_url_t *u)
n = ngx_atoi(port, len);
- if (n < 1 || n > 65536) {
+ if (n < 1 || n > 65535) {
u->err = "invalid port";
return NGX_ERROR;
}
View
@@ -91,8 +91,10 @@ static u_char *ngx_resolver_log_error(ngx_log_t *log, u_char *buf, size_t len);
ngx_resolver_t *
-ngx_resolver_create(ngx_conf_t *cf, ngx_addr_t *addr)
+ngx_resolver_create(ngx_conf_t *cf, ngx_str_t *names, ngx_uint_t n)
{
+ ngx_url_t u;
+ ngx_uint_t i;
ngx_resolver_t *r;
ngx_pool_cleanup_t *cln;
ngx_udp_connection_t *uc;
@@ -109,6 +111,15 @@ ngx_resolver_create(ngx_conf_t *cf, ngx_addr_t *addr)
return NULL;
}
+ if (n) {
+ if (ngx_array_init(&r->udp_connections, cf->pool, n,
+ sizeof(ngx_udp_connection_t))
+ != NGX_OK)
+ {
+ return NULL;
+ }
+ }
+
cln->data = r;
r->event = ngx_calloc(sizeof(ngx_event_t), cf->log);
@@ -140,17 +151,27 @@ ngx_resolver_create(ngx_conf_t *cf, ngx_addr_t *addr)
r->log = &cf->cycle->new_log;
r->log_level = NGX_LOG_ERR;
- if (addr) {
- uc = ngx_calloc(sizeof(ngx_udp_connection_t), cf->log);
+ for (i = 0; i < n; i++) {
+ ngx_memzero(&u, sizeof(ngx_url_t));
+
+ u.host = names[i];
+ u.port = 53;
+
+ if (ngx_inet_resolve_host(cf->pool, &u) != NGX_OK) {
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "%V: %s", &u.host, u.err);
+ return NULL;
+ }
+
+ uc = ngx_array_push(&r->udp_connections);
if (uc == NULL) {
return NULL;
}
- r->udp_connection = uc;
+ ngx_memzero(uc, sizeof(ngx_udp_connection_t));
- uc->sockaddr = addr->sockaddr;
- uc->socklen = addr->socklen;
- uc->server = addr->name;
+ uc->sockaddr = u.addrs->sockaddr;
+ uc->socklen = u.addrs->socklen;
+ uc->server = u.addrs->name;
uc->log = cf->cycle->new_log;
uc->log.handler = ngx_resolver_log_error;
@@ -167,6 +188,9 @@ ngx_resolver_cleanup(void *data)
{
ngx_resolver_t *r = data;
+ ngx_uint_t i;
+ ngx_udp_connection_t *uc;
+
if (r) {
ngx_log_debug0(NGX_LOG_DEBUG_CORE, ngx_cycle->log, 0,
"cleanup resolver");
@@ -179,12 +203,13 @@ ngx_resolver_cleanup(void *data)
ngx_free(r->event);
}
- if (r->udp_connection) {
- if (r->udp_connection->connection) {
- ngx_close_connection(r->udp_connection->connection);
- }
- ngx_free(r->udp_connection);
+ uc = r->udp_connections.elts;
+
+ for (i = 0; i < r->udp_connections.nelts; i++) {
+ if (uc[i].connection) {
+ ngx_close_connection(uc[i].connection);
+ }
}
ngx_free(r);
@@ -242,7 +267,7 @@ ngx_resolve_start(ngx_resolver_t *r, ngx_resolver_ctx_t *temp)
}
}
- if (r->udp_connection == NULL) {
+ if (r->udp_connections.nelts == 0) {
return NGX_NO_RESOLVER;
}
@@ -826,7 +851,12 @@ ngx_resolver_send_query(ngx_resolver_t *r, ngx_resolver_node_t *rn)
ssize_t n;
ngx_udp_connection_t *uc;
- uc = r->udp_connection;
+ uc = r->udp_connections.elts;
+
+ uc = &uc[r->last_connection++];
+ if (r->last_connection == r->udp_connections.nelts) {
+ r->last_connection = 0;
+ }
if (uc->connection == NULL) {
if (ngx_udp_connect(uc) != NGX_OK) {
Oops, something went wrong.

0 comments on commit 156a156

Please sign in to comment.