# HG changeset patch # User Igor Sysoev # Date 1248700485 0 # Node ID 4121acaf7a049746d8760381651a93221d8a994c # Parent b630e7d095b3d82bfe0240ce567bb3392b76c1e6 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 --- 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 *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_ *ho = *h; + r->headers_out.accept_ranges = ho; + return NGX_OK; }