Welcome! Log In Create A New Profile

Advanced

[PATCH 3 of 5] SSI: response might be truncated after include with wait="yes"

Maxim Dounin
January 15, 2010 06:58AM
# HG changeset patch
# User Maxim Dounin <mdounin@mdounin.ru>
# Date 1263229555 -10800
# Node ID 5cc739cb96a7c5742d3b96415cafa8ef44afd1a4
# Parent 186e9471419a07250d144e390b43cd1cf7dcd561
SSI: response might be truncated after include with wait="yes".

In 0.7.29+ this also affects include file="..." (as it has wait="yes"
implicitly in 0.7.29+). The bug had appeared in 0.7.25.

Reported by: Maxim Khitrov

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
@@ -71,6 +71,8 @@ typedef enum {

static ngx_int_t ngx_http_ssi_output(ngx_http_request_t *r,
ngx_http_ssi_ctx_t *ctx);
+static void ngx_http_ssi_buffering(ngx_http_request_t *r,
+ ngx_http_ssi_ctx_t *ctx);
static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r,
ngx_http_ssi_ctx_t *ctx);
static ngx_str_t *ngx_http_ssi_get_variable(ngx_http_request_t *r,
@@ -798,6 +800,7 @@ ngx_http_ssi_body_filter(ngx_http_reques
}

if (rc == NGX_DONE || rc == NGX_AGAIN || rc == NGX_ERROR) {
+ ngx_http_ssi_buffering(r, ctx);
return rc;
}
}
@@ -950,14 +953,21 @@ ngx_http_ssi_output(ngx_http_request_t *
}
}

+ ngx_http_ssi_buffering(r, ctx);
+
+ return rc;
+}
+
+
+static void
+ngx_http_ssi_buffering(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx)
+{
if (ctx->in || ctx->buf) {
r->buffered |= NGX_HTTP_SSI_BUFFERED;

} else {
r->buffered &= ~NGX_HTTP_SSI_BUFFERED;
}
-
- return rc;
}



_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 0 of 5] various patches

Maxim Dounin 2657 January 15, 2010 06:56AM

[PATCH 1 of 5] Autoindex: escape html in file names

Maxim Dounin 1152 January 15, 2010 06:58AM

[PATCH 2 of 5] Core: escape "<", ">", and """ in urls

Maxim Dounin 1166 January 15, 2010 06:58AM

Re: [PATCH 2 of 5] Core: escape "<", ">", and """ in urls

Maxim Dounin 1325 April 18, 2010 02:14PM

[PATCH 3 of 5] SSI: response might be truncated after include with wait="yes"

Maxim Dounin 1136 January 15, 2010 06:58AM

[PATCH 4 of 5] Proxy: fix error messages for proxy_redirect default

Maxim Dounin 1195 January 15, 2010 06:58AM

[PATCH 5 of 5] Core: resolve various cycles with named locations and post_action

Maxim Dounin 1214 January 15, 2010 07:00AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 221
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready