comparison 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
comparison
equal deleted inserted replaced
5958:a9138c35120d 5959:f7584d7c0ccb
2626 if (u->headers_in.etag) { 2626 if (u->headers_in.etag) {
2627 r->cache->etag = u->headers_in.etag->value; 2627 r->cache->etag = u->headers_in.etag->value;
2628 } 2628 }
2629 } 2629 }
2630 2630
2631 ngx_http_file_cache_set_header(r, u->buffer.start); 2631 if (ngx_http_file_cache_set_header(r, u->buffer.start) != NGX_OK) {
2632 ngx_http_upstream_finalize_request(r, u, NGX_ERROR);
2633 return;
2634 }
2632 2635
2633 } else { 2636 } else {
2634 u->cacheable = 0; 2637 u->cacheable = 0;
2635 } 2638 }
2636 } 2639 }