# HG changeset patch # User Igor Sysoev # Date 1160752810 0 # Node ID 4ab852b691f5a3a5a57f4f6e599d41b78c157659 # Parent 5622cdd48e5bbc39960487b859f4217b3910916c diff --git a/src/http/modules/ngx_http_addition_filter_module.c b/src/http/modules/ngx_http_addition_filter_module.c --- a/src/http/modules/ngx_http_addition_filter_module.c +++ b/src/http/modules/ngx_http_addition_filter_module.c @@ -144,10 +144,10 @@ ngx_http_addition_body_filter(ngx_http_r ctx->before_body_sent = 1; if (conf->before_body.len) { - if (ngx_http_subrequest(r, &conf->before_body, NULL, &sr, NULL, 0) - == NGX_ERROR) - { - return NGX_ERROR; + rc = ngx_http_subrequest(r, &conf->before_body, NULL, &sr, NULL, 0); + + if (rc == NGX_ERROR || rc == NGX_DONE) { + return rc; } } } @@ -168,10 +168,10 @@ ngx_http_addition_body_filter(ngx_http_r return rc; } - if (ngx_http_subrequest(r, &conf->after_body, NULL, &sr, NULL, 0) - == NGX_ERROR) - { - return NGX_ERROR; + rc = ngx_http_subrequest(r, &conf->after_body, NULL, &sr, NULL, 0); + + if (rc == NGX_ERROR || rc == NGX_DONE) { + return rc; } ngx_http_set_ctx(r, NULL, ngx_http_addition_filter_module); diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c --- a/src/http/modules/ngx_http_fastcgi_module.c +++ b/src/http/modules/ngx_http_fastcgi_module.c @@ -395,6 +395,13 @@ ngx_http_fastcgi_handler(ngx_http_reques ngx_http_upstream_t *u; ngx_http_fastcgi_loc_conf_t *flcf; + if (r->subrequest_in_memory) { + ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, + "ngx_http_fastcgi_module does not support " + "subrequest in memeory"); + return NGX_HTTP_INTERNAL_SERVER_ERROR; + } + flcf = ngx_http_get_module_loc_conf(r, ngx_http_fastcgi_module); u = ngx_pcalloc(r->pool, sizeof(ngx_http_upstream_t)); diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c --- a/src/http/modules/ngx_http_ssi_filter_module.c +++ b/src/http/modules/ngx_http_ssi_filter_module.c @@ -78,6 +78,10 @@ static ngx_int_t ngx_http_ssi_evaluate_s static ngx_int_t ngx_http_ssi_include(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, ngx_str_t **params); +static ngx_int_t ngx_http_ssi_stub_output(ngx_http_request_t *r, void *data, + ngx_int_t rc); +static ngx_int_t ngx_http_ssi_set_variable(ngx_http_request_t *r, void *data, + ngx_int_t rc); static ngx_int_t ngx_http_ssi_echo(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx, ngx_str_t **params); static ngx_int_t ngx_http_ssi_config(ngx_http_request_t *r, @@ -197,11 +201,14 @@ static ngx_http_output_body_filter_pt static u_char ngx_http_ssi_string[] = "