From 49d9d9b77864beb758ac34a9cdbb5a4004984ee6 Mon Sep 17 00:00:00 2001 From: "agentzh (Yichun Zhang)" Date: Mon, 8 Apr 2013 16:50:48 -0700 Subject: [PATCH] nginx-1.2.7-upstream_truncation.patch: worked around an issue in ngx_event_pipe_copy_input_filter because it does not set p->upstream_done when p->length <= 0 like ngx_http_proxy_copy_filter. --- patches/nginx-1.2.7-upstream_truncation.patch | 6 +++--- util/ver | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/patches/nginx-1.2.7-upstream_truncation.patch b/patches/nginx-1.2.7-upstream_truncation.patch index 5cbee2d..c8cddf4 100644 --- a/patches/nginx-1.2.7-upstream_truncation.patch +++ b/patches/nginx-1.2.7-upstream_truncation.patch @@ -76,7 +76,7 @@ diff --exclude '*~' --exclude '*.swp' -urp nginx-1.2.7/src/http/modules/ngx_http { diff --exclude '*~' --exclude '*.swp' -urp nginx-1.2.7/src/http/ngx_http_upstream.c nginx-1.2.7-patched/src/http/ngx_http_upstream.c --- nginx-1.2.7/src/http/ngx_http_upstream.c 2013-02-11 06:39:49.000000000 -0800 -+++ nginx-1.2.7-patched/src/http/ngx_http_upstream.c 2013-04-06 17:16:54.444520038 -0700 ++++ nginx-1.2.7-patched/src/http/ngx_http_upstream.c 2013-04-08 16:37:48.326752696 -0700 @@ -2399,7 +2399,7 @@ ngx_http_upstream_process_non_buffered_u if (c->read->timedout) { @@ -95,7 +95,7 @@ diff --exclude '*~' --exclude '*.swp' -urp nginx-1.2.7/src/http/ngx_http_upstrea + || (upstream->read->eof + && u->length == -1 + && u->pipe -+ && u->pipe->length == -1)) ++ && u->pipe->length <= 0)) { ngx_http_upstream_finalize_request(r, u, 0); return; @@ -115,7 +115,7 @@ diff --exclude '*~' --exclude '*.swp' -urp nginx-1.2.7/src/http/ngx_http_upstrea - if (p->upstream_done || p->upstream_eof || p->upstream_error) { + if (p->upstream_done -+ || (p->upstream_eof && u->length == -1 && p->length == -1)) ++ || (p->upstream_eof && u->length == -1 && p->length <= 0)) + { ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http upstream exit: %p", p->out); diff --git a/util/ver b/util/ver index f5a5a97..839df3d 100755 --- a/util/ver +++ b/util/ver @@ -2,7 +2,7 @@ #main_ver=1.3.11 main_ver=1.2.7 -minor_ver=5rc2 +minor_ver=5rc4 version=$main_ver.$minor_ver echo $version