mirror of
				https://github.com/openresty/openresty.git
				synced 2024-10-13 00:29:41 +00:00 
			
		
		
		
	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.
This commit is contained in:
		| @ -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); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user