mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
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.
This commit is contained in:
parent
187f3948ed
commit
416b922bd2
@ -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;
|
||||
|
@ -1994,7 +1994,7 @@ ngx_http_upstream_process_headers(ngx_http_request_t *r, ngx_http_upstream_t *u)
|
||||
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user