diff src/http/ngx_http_upstream.h @ 5732:d0ce06cb9be1

Upstream: fixed cache revalidation with SSI. Previous code in ngx_http_upstream_send_response() used last modified time from r->headers_out.last_modified_time after the header filter chain was already called. At this point, last_modified_time may be already cleared, e.g., with SSI, resulting in incorrect last modified time stored in a cache file. Fix is to introduce u->headers_in.last_modified_time instead.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 26 Jun 2014 02:20:09 +0400
parents efc84a5723b3
children d09b689911ac
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.h
+++ b/src/http/ngx_http_upstream.h
@@ -246,11 +246,12 @@ typedef struct {
     ngx_table_elt_t                 *content_encoding;
 #endif
 
-    off_t                            content_length_n;
-
     ngx_array_t                      cache_control;
     ngx_array_t                      cookies;
 
+    off_t                            content_length_n;
+    time_t                           last_modified_time;
+
     unsigned                         connection_close:1;
     unsigned                         chunked:1;
 } ngx_http_upstream_headers_in_t;