support 304 for cacheable responses
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index e7e8091..68b4d5a 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -1958,6 +1958,7 @@
 
         } else {
             u->cacheable = 0;
+            r->headers_out.last_modified_time = -1;
         }
     }
 
@@ -3179,7 +3180,7 @@
 
 #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);