Mercurial > hg > nginx-quic
comparison 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 |
comparison
equal
deleted
inserted
replaced
5299:b779728b180c | 5300:f538a67c9f77 |
---|---|
439 ngx_http_upstream_t *u; | 439 ngx_http_upstream_t *u; |
440 | 440 |
441 u = ctx->request->upstream; | 441 u = ctx->request->upstream; |
442 | 442 |
443 if (u->headers_in.status_n != 404) { | 443 if (u->headers_in.status_n != 404) { |
444 u->length += NGX_HTTP_MEMCACHED_END; | 444 u->length = u->headers_in.content_length_n + NGX_HTTP_MEMCACHED_END; |
445 ctx->rest = NGX_HTTP_MEMCACHED_END; | 445 ctx->rest = NGX_HTTP_MEMCACHED_END; |
446 | |
447 } else { | |
448 u->length = 0; | |
446 } | 449 } |
447 | 450 |
448 return NGX_OK; | 451 return NGX_OK; |
449 } | 452 } |
450 | 453 |