Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 5737:44b9ab7752e3
Cache: ETag now saved into cache header.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 26 Jun 2014 02:28:23 +0400 |
parents | 5fb1e57c758a |
children | c95d7882dfc9 |
comparison
equal
deleted
inserted
replaced
5736:2fe1967f8854 | 5737:44b9ab7752e3 |
---|---|
2496 if (valid) { | 2496 if (valid) { |
2497 r->cache->last_modified = u->headers_in.last_modified_time; | 2497 r->cache->last_modified = u->headers_in.last_modified_time; |
2498 r->cache->date = now; | 2498 r->cache->date = now; |
2499 r->cache->body_start = (u_short) (u->buffer.pos - u->buffer.start); | 2499 r->cache->body_start = (u_short) (u->buffer.pos - u->buffer.start); |
2500 | 2500 |
2501 if (u->headers_in.etag) { | |
2502 r->cache->etag = u->headers_in.etag->value; | |
2503 } | |
2504 | |
2501 ngx_http_file_cache_set_header(r, u->buffer.start); | 2505 ngx_http_file_cache_set_header(r, u->buffer.start); |
2502 | 2506 |
2503 } else { | 2507 } else { |
2504 u->cacheable = 0; | 2508 u->cacheable = 0; |
2505 } | 2509 } |