Mercurial > hg > nginx
diff src/http/modules/ngx_http_memcached_module.c @ 5300:f538a67c9f77
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 25 Jul 2013 14:58:11 +0400 |
parents | a30ea5c6451d |
children | 2fda9065d0f4 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_memcached_module.c Thu Jul 25 14:56:59 2013 +0400 +++ b/src/http/modules/ngx_http_memcached_module.c Thu Jul 25 14:58:11 2013 +0400 @@ -441,8 +441,11 @@ 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;