summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-04-15 11:17:38 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-04-15 11:17:38 +0000
commite41e7247261d98175f71c9362dd0878544177177 (patch)
tree5016bf7c6946092a2864201674f0ad8e6dc3f61b /src
parent50e1cc45609b94259d3a9f2474a2c4682de776c2 (diff)
downloadnginx-e41e7247261d98175f71c9362dd0878544177177.tar.gz
nginx-e41e7247261d98175f71c9362dd0878544177177.tar.bz2
support 304 for cacheable responses
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_upstream.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index e7e809103..68b4d5a39 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -1958,6 +1958,7 @@ ngx_http_upstream_send_response(ngx_http_request_t *r, ngx_http_upstream_t *u)
} else {
u->cacheable = 0;
+ r->headers_out.last_modified_time = -1;
}
}
@@ -3179,7 +3180,7 @@ ngx_http_upstream_copy_last_modified(ngx_http_request_t *r, ngx_table_elt_t *h,
#if (NGX_HTTP_CACHE)
- if (r->cached) {
+ if (r->cached || r->upstream->cacheable) {
r->headers_out.last_modified = ho;
r->headers_out.last_modified_time = ngx_http_parse_time(h->value.data,
h->value.len);