aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_memcached_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_memcached_module.c')
-rw-r--r--src/http/modules/ngx_http_memcached_module.c5
1 files changed, 4 insertions, 1 deletions
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;