diff options
author | Igor Sysoev <igor@sysoev.ru> | 2007-06-17 19:14:09 +0000 |
---|---|---|
committer | Jonathan Kolb <jon@b0g.us> | 2007-06-17 19:14:09 +0000 |
commit | 373100239c2731609f7198bbe37d972052fe03be (patch) | |
tree | f0a41903266a6caba16915cdfe02d73edd3b5364 | |
parent | 65a46859ed997403f7911e0ec29e219876f2a842 (diff) | |
download | nginx-0.6.1.tar.gz |
Changes with nginx 0.6.1 17 Jun 2007v0.6.1
*) Bugfix: in SSI parsing.
*) Bugfix: if remote SSI subrequest was used, then posterior local file
subrequest might transferred to client in wrong order.
*) Bugfix: large SSI inclusions buffered in temporary files were
truncated.
*) Bugfix: the perl $$ variable value in ngx_http_perl_module was equal
to the master process identification number.
-rw-r--r-- | CHANGES | 14 | ||||
-rw-r--r-- | CHANGES.ru | 15 | ||||
-rw-r--r-- | src/core/nginx.h | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_ssi_filter_module.c | 11 | ||||
-rw-r--r-- | src/http/modules/perl/nginx.pm | 2 | ||||
-rw-r--r-- | src/http/modules/perl/ngx_http_perl_module.c | 24 | ||||
-rw-r--r-- | src/http/ngx_http_copy_filter_module.c | 4 | ||||
-rw-r--r-- | src/http/ngx_http_upstream.c | 13 |
8 files changed, 78 insertions, 7 deletions
@@ -1,4 +1,18 @@ +Changes with nginx 0.6.1 17 Jun 2007 + + *) Bugfix: in SSI parsing. + + *) Bugfix: if remote SSI subrequest was used, then posterior local file + subrequest might transferred to client in wrong order. + + *) Bugfix: large SSI inclusions buffered in temporary files were + truncated. + + *) Bugfix: the perl $$ variable value in ngx_http_perl_module was equal + to the master process identification number. + + Changes with nginx 0.6.0 14 Jun 2007 *) Feature: the "server_name", "map", and "valid_referers" directives diff --git a/CHANGES.ru b/CHANGES.ru index 455dcce2b..c2e14f312 100644 --- a/CHANGES.ru +++ b/CHANGES.ru @@ -1,4 +1,19 @@ +Изменения в nginx 0.6.1 17.06.2007 + + *) Исправление: в парсинге SSI. + + *) Исправление: при использовании удалённого подзапроса в SSI + последующий подзапрос локального файла мог отдаваться клиенту в + неверном порядке. + + *) Исправление: большие включения в SSI, сохранённые во временные + файлы, передавались не полностью. + + *) Исправление: значение perl'овой переменной $$ модуля + ngx_http_perl_module было равно номеру главного процесса. + + Изменения в nginx 0.6.0 14.06.2007 *) Добавление: директивы "server_name", "map", and "valid_referers" diff --git a/src/core/nginx.h b/src/core/nginx.h index e75ac5fde..b76532874 100644 --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,7 +8,7 @@ #define _NGINX_H_INCLUDED_ -#define NGINX_VERSION "0.6.0" +#define NGINX_VERSION "0.6.1" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c index f16c34736..549ae4ce2 100644 --- a/src/http/modules/ngx_http_ssi_filter_module.c +++ b/src/http/modules/ngx_http_ssi_filter_module.c @@ -800,8 +800,14 @@ ngx_http_ssi_body_filter(ngx_http_request_t *r, ngx_chain_t *in) } } - if (cmd->flush && ctx->out) { - rc = ngx_http_ssi_output(r, ctx); + if (cmd->flush) { + + if (ctx->out) { + rc = ngx_http_ssi_output(r, ctx); + + } else { + rc = ngx_http_next_body_filter(r, NULL); + } if (rc == NGX_ERROR) { return NGX_ERROR; @@ -1020,6 +1026,7 @@ ngx_http_ssi_parse(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx) ch = *p; } + ctx->state = state; ctx->pos = p; ctx->looked = looked; ctx->copy_end = p; diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm index 0793f07b7..51002d1dc 100644 --- a/src/http/modules/perl/nginx.pm +++ b/src/http/modules/perl/nginx.pm @@ -47,7 +47,7 @@ our @EXPORT = qw( HTTP_INSUFFICIENT_STORAGE ); -our $VERSION = '0.6.0'; +our $VERSION = '0.6.1'; require XSLoader; XSLoader::load('nginx', $VERSION); diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c index b8352f056..248f57823 100644 --- a/src/http/modules/perl/ngx_http_perl_module.c +++ b/src/http/modules/perl/ngx_http_perl_module.c @@ -67,6 +67,7 @@ static char *ngx_http_perl_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); static void ngx_http_perl_cleanup_perl(void *data); #endif +static ngx_int_t ngx_http_perl_init_worker(ngx_cycle_t *cycle); static void ngx_http_perl_exit(ngx_cycle_t *cycle); @@ -126,7 +127,7 @@ ngx_module_t ngx_http_perl_module = { NGX_HTTP_MODULE, /* module type */ NULL, /* init master */ NULL, /* init module */ - NULL, /* init process */ + ngx_http_perl_init_worker, /* init process */ NULL, /* init thread */ NULL, /* exit thread */ NULL, /* exit process */ @@ -1004,6 +1005,27 @@ ngx_http_perl_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) } +static ngx_int_t +ngx_http_perl_init_worker(ngx_cycle_t *cycle) +{ + ngx_http_perl_main_conf_t *pmcf; + + pmcf = ngx_http_cycle_get_module_main_conf(cycle, ngx_http_perl_module); + + { + + dTHXa(pmcf->perl); + PERL_SET_CONTEXT(pmcf->perl); + + /* set worker's $$ */ + + sv_setiv(GvSV(gv_fetchpv("$", TRUE, SVt_PV)), (I32) ngx_pid); + + } + + return NGX_OK; +} + static void ngx_http_perl_exit(ngx_cycle_t *cycle) { diff --git a/src/http/ngx_http_copy_filter_module.c b/src/http/ngx_http_copy_filter_module.c index c96dbfa76..3069779c2 100644 --- a/src/http/ngx_http_copy_filter_module.c +++ b/src/http/ngx_http_copy_filter_module.c @@ -117,6 +117,10 @@ ngx_http_copy_filter(ngx_http_request_t *r, ngx_chain_t *in) r->buffered |= NGX_HTTP_COPY_BUFFERED; } + if (r != r->main) { + r->out = ctx->in; + } + #if (NGX_DEBUG) ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "copy filter: %i \"%V?%V\"", rc, &r->uri, &r->args); diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 392783664..c1bae266c 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -2157,8 +2157,17 @@ ngx_http_upstream_finalize_request(ngx_http_request_t *r, r->connection->log->action = "sending to client"; - if (rc == 0 && r == r->main && !r->post_action) { - rc = ngx_http_send_special(r, NGX_HTTP_LAST); + if (rc == 0) { + if (r == r->main) { + if (!r->post_action) { + rc = ngx_http_send_special(r, NGX_HTTP_LAST); + } + + } else { + if (r->out) { + rc = NGX_AGAIN; + } + } } ngx_http_finalize_request(r, rc); |