Mercurial > hg > nginx
diff src/http/ngx_http_upstream.c @ 5959:f7584d7c0ccb
Cache: update variant while setting header.
Some parts of code related to handling variants of a resource moved into
a separate function that is called earlier. This allows to use cache file
name as a prefix for temporary file in the following patch.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Fri, 26 Dec 2014 16:22:56 +0300 |
parents | 610832763648 |
children | e9effef98874 |
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c Fri Dec 26 16:22:54 2014 +0300 +++ b/src/http/ngx_http_upstream.c Fri Dec 26 16:22:56 2014 +0300 @@ -2628,7 +2628,10 @@ } } - ngx_http_file_cache_set_header(r, u->buffer.start); + if (ngx_http_file_cache_set_header(r, u->buffer.start) != NGX_OK) { + ngx_http_upstream_finalize_request(r, u, NGX_ERROR); + return; + } } else { u->cacheable = 0;