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.
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;
r->headers_out.content_length_n = u->headers_in.content_length_n;
- u->length = u->headers_in.content_length_n;
+ u->length = -1;
return NGX_OK;
}