From: Igor Sysoev Date: Mon, 27 Jul 2009 13:14:45 +0000 (+0000) Subject: fix handling "Last-Modified" and "Accept-Ranges" for upstream responses X-Git-Tag: release-0.8.7~3 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=ce1ba38b936ac4320ea3dfc21dc2ed6d777bfb90;p=nginx.git fix handling "Last-Modified" and "Accept-Ranges" for upstream responses --- diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index e37019609..a8cf07fa8 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -3301,10 +3301,11 @@ ngx_http_upstream_copy_last_modified(ngx_http_request_t *r, ngx_table_elt_t *h, *ho = *h; + r->headers_out.last_modified = ho; + #if (NGX_HTTP_CACHE) if (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); } @@ -3428,6 +3429,8 @@ ngx_http_upstream_copy_allow_ranges(ngx_http_request_t *r, *ho = *h; + r->headers_out.accept_ranges = ho; + return NGX_OK; }