From 416b922bd2c285551d195c1f33a3736775ea45e9 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Thu, 25 Jul 2013 14:58:11 +0400 Subject: Upstream: u->length now defaults to -1 (API change). That is, by default we assume that response end is signalled by a connection close. This seems to be better default, and in line with u->pipe->length behaviour. Memcached module was modified accordingly. --- src/http/modules/ngx_http_memcached_module.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/http/modules') diff --git a/src/http/modules/ngx_http_memcached_module.c b/src/http/modules/ngx_http_memcached_module.c index c36ad0ffb..bfff1bfc2 100644 --- a/src/http/modules/ngx_http_memcached_module.c +++ b/src/http/modules/ngx_http_memcached_module.c @@ -441,8 +441,11 @@ ngx_http_memcached_filter_init(void *data) u = ctx->request->upstream; if (u->headers_in.status_n != 404) { - u->length += NGX_HTTP_MEMCACHED_END; + u->length = u->headers_in.content_length_n + NGX_HTTP_MEMCACHED_END; ctx->rest = NGX_HTTP_MEMCACHED_END; + + } else { + u->length = 0; } return NGX_OK; -- cgit