diff options
author | nginx <nginx@nginx.org> | 2013-04-24 14:11:57 +0000 |
---|---|---|
committer | Jon Kolb <jon@b0g.us> | 2013-04-24 14:11:57 +0000 |
commit | 740eba7e73bf85fd7e93e2d908f64f649d1819ab (patch) | |
tree | 0c694118582bedb377359a58e879df444c583c89 | |
parent | 73a0d767d316125bc5b39609918d42521e14afdb (diff) | |
download | nginx-740eba7e73bf85fd7e93e2d908f64f649d1819ab.tar.gz |
Changes with nginx 1.4.0 24 Apr 2013v1.4.0
*) Bugfix: nginx could not be built with the ngx_http_perl_module if the
--with-openssl option was used; the bug had appeared in 1.3.16.
*) Bugfix: in a request body handling in the ngx_http_perl_module; the
bug had appeared in 1.3.9.
-rw-r--r-- | CHANGES | 9 | ||||
-rw-r--r-- | CHANGES.ru | 9 | ||||
-rw-r--r-- | auto/lib/md5/conf | 6 | ||||
-rw-r--r-- | auto/lib/perl/make | 2 | ||||
-rw-r--r-- | auto/lib/sha1/conf | 2 | ||||
-rw-r--r-- | src/core/nginx.h | 4 | ||||
-rw-r--r-- | src/http/modules/perl/Makefile.PL | 2 | ||||
-rw-r--r-- | src/http/modules/perl/nginx.xs | 39 | ||||
-rw-r--r-- | src/http/ngx_http_spdy.c | 1 |
9 files changed, 63 insertions, 11 deletions
@@ -1,4 +1,13 @@ +Changes with nginx 1.4.0 24 Apr 2013 + + *) Bugfix: nginx could not be built with the ngx_http_perl_module if the + --with-openssl option was used; the bug had appeared in 1.3.16. + + *) Bugfix: in a request body handling in the ngx_http_perl_module; the + bug had appeared in 1.3.9. + + Changes with nginx 1.3.16 16 Apr 2013 *) Bugfix: a segmentation fault might occur in a worker process if diff --git a/CHANGES.ru b/CHANGES.ru index 62125c847..cb961d08b 100644 --- a/CHANGES.ru +++ b/CHANGES.ru @@ -1,4 +1,13 @@ +Изменения в nginx 1.4.0 24.04.2013 + + *) Исправление: nginx не собирался с модулем ngx_http_perl_module, если + использовался параметр --with-openssl; ошибка появилась в 1.3.16. + + *) Исправление: в работе с телом запроса из модуля ngx_http_perl_module; + ошибка появилась в 1.3.9. + + Изменения в nginx 1.3.16 16.04.2013 *) Исправление: в рабочем процессе мог произойти segmentation fault, diff --git a/auto/lib/md5/conf b/auto/lib/md5/conf index f9c1ed902..eb5dfd1f2 100644 --- a/auto/lib/md5/conf +++ b/auto/lib/md5/conf @@ -52,7 +52,7 @@ else # FreeBSD, Solaris 10 - ngx_feature="system md library" + ngx_feature="md5 in system md library" ngx_feature_name=NGX_HAVE_MD5 ngx_feature_run=no ngx_feature_incs="#include <md5.h>" @@ -67,7 +67,7 @@ else # Solaris 8/9 - ngx_feature="system md5 library" + ngx_feature="md5 in system md5 library" ngx_feature_libs="-lmd5" . auto/feature @@ -78,7 +78,7 @@ else # OpenSSL crypto library - ngx_feature="OpenSSL md5 crypto library" + ngx_feature="md5 in system OpenSSL crypto library" ngx_feature_name="NGX_OPENSSL_MD5" ngx_feature_incs="#include <openssl/md5.h>" ngx_feature_libs="-lcrypto" diff --git a/auto/lib/perl/make b/auto/lib/perl/make index 9c5e826e8..260bd95a0 100644 --- a/auto/lib/perl/make +++ b/auto/lib/perl/make @@ -31,7 +31,7 @@ $NGX_OBJS/src/http/modules/perl/Makefile: \\ cd $NGX_OBJS/src/http/modules/perl \\ && NGX_PM_CFLAGS="\$(NGX_PM_CFLAGS) -g $NGX_CC_OPT" \\ - NGX_INCS="\$(CORE_INCS) \$(HTTP_INCS)" \\ + NGX_INCS="$CORE_INCS $NGX_OBJS $HTTP_INCS" \\ NGX_DEPS="\$(CORE_DEPS) \$(HTTP_DEPS)" \\ $NGX_PERL Makefile.PL \\ LIB=$NGX_PERL_MODULES \\ diff --git a/auto/lib/sha1/conf b/auto/lib/sha1/conf index 1e644c02f..fd69afda2 100644 --- a/auto/lib/sha1/conf +++ b/auto/lib/sha1/conf @@ -57,7 +57,7 @@ else # OpenSSL crypto library - ngx_feature="OpenSSL sha1 crypto library" + ngx_feature="sha1 in system OpenSSL crypto library" ngx_feature_incs="#include <openssl/sha.h>" ngx_feature_libs="-lcrypto" . auto/feature diff --git a/src/core/nginx.h b/src/core/nginx.h index d6b53c876..fec8b6680 100644 --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -9,8 +9,8 @@ #define _NGINX_H_INCLUDED_ -#define nginx_version 1003016 -#define NGINX_VERSION "1.3.16" +#define nginx_version 1004000 +#define NGINX_VERSION "1.4.0" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/src/http/modules/perl/Makefile.PL b/src/http/modules/perl/Makefile.PL index ff8b2c634..03348b555 100644 --- a/src/http/modules/perl/Makefile.PL +++ b/src/http/modules/perl/Makefile.PL @@ -22,7 +22,7 @@ WriteMakefile( depend => { 'nginx.c' => join(" ", map { - "../../../../../$_" + m#^/# ? $_ : "../../../../../$_" } (split(/\s+/, $ENV{NGX_DEPS}), "src/http/modules/perl/ngx_http_perl_module.h")) }, diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs index ed9743911..bbfef079c 100644 --- a/src/http/modules/perl/nginx.xs +++ b/src/http/modules/perl/nginx.xs @@ -357,7 +357,7 @@ has_request_body(r, next) ngx_http_perl_set_request(r); - if (r->headers_in.content_length_n <= 0) { + if (r->headers_in.content_length_n <= 0 && !r->headers_in.chunked) { XSRETURN_UNDEF; } @@ -386,7 +386,10 @@ request_body(r) dXSTARG; ngx_http_request_t *r; + u_char *p, *data; size_t len; + ngx_buf_t *buf; + ngx_chain_t *cl; ngx_http_perl_set_request(r); @@ -397,13 +400,43 @@ request_body(r) XSRETURN_UNDEF; } - len = r->request_body->bufs->buf->last - r->request_body->bufs->buf->pos; + cl = r->request_body->bufs; + buf = cl->buf; + + if (cl->next == NULL) { + len = buf->last - buf->pos; + data = buf->pos; + goto done; + } + + len = buf->last - buf->pos; + cl = cl->next; + + for ( /* void */ ; cl; cl = cl->next) { + buf = cl->buf; + len += buf->last - buf->pos; + } + + p = ngx_pnalloc(r->pool, len); + if (p == NULL) { + return XSRETURN_UNDEF; + } + + data = p; + cl = r->request_body->bufs; + + for ( /* void */ ; cl; cl = cl->next) { + buf = cl->buf; + p = ngx_cpymem(p, buf->pos, buf->last - buf->pos); + } + + done: if (len == 0) { XSRETURN_UNDEF; } - ngx_http_perl_set_targ(r->request_body->bufs->buf->pos, len); + ngx_http_perl_set_targ(data, len); ST(0) = TARG; diff --git a/src/http/ngx_http_spdy.c b/src/http/ngx_http_spdy.c index 0e6fe9281..3febc23e9 100644 --- a/src/http/ngx_http_spdy.c +++ b/src/http/ngx_http_spdy.c @@ -1830,6 +1830,7 @@ ngx_http_spdy_create_stream(ngx_http_spdy_connection_t *sc, ngx_uint_t id, fc->log = log; fc->buffered = 0; fc->sndlowat = 1; + fc->tcp_nodelay = NGX_TCP_NODELAY_DISABLED; r = ngx_http_create_request(fc); if (r == NULL) { |