Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 3004:4121acaf7a04
fix handling "Last-Modified" and "Accept-Ranges" for upstream responses
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 27 Jul 2009 13:14:45 +0000 |
parents | b630e7d095b3 |
children | 95972b9e790b |
comparison
equal
deleted
inserted
replaced
3003:b630e7d095b3 | 3004:4121acaf7a04 |
---|---|
3299 return NGX_ERROR; | 3299 return NGX_ERROR; |
3300 } | 3300 } |
3301 | 3301 |
3302 *ho = *h; | 3302 *ho = *h; |
3303 | 3303 |
3304 r->headers_out.last_modified = ho; | |
3305 | |
3304 #if (NGX_HTTP_CACHE) | 3306 #if (NGX_HTTP_CACHE) |
3305 | 3307 |
3306 if (r->upstream->cacheable) { | 3308 if (r->upstream->cacheable) { |
3307 r->headers_out.last_modified = ho; | |
3308 r->headers_out.last_modified_time = ngx_http_parse_time(h->value.data, | 3309 r->headers_out.last_modified_time = ngx_http_parse_time(h->value.data, |
3309 h->value.len); | 3310 h->value.len); |
3310 } | 3311 } |
3311 | 3312 |
3312 #endif | 3313 #endif |
3425 if (ho == NULL) { | 3426 if (ho == NULL) { |
3426 return NGX_ERROR; | 3427 return NGX_ERROR; |
3427 } | 3428 } |
3428 | 3429 |
3429 *ho = *h; | 3430 *ho = *h; |
3431 | |
3432 r->headers_out.accept_ranges = ho; | |
3430 | 3433 |
3431 return NGX_OK; | 3434 return NGX_OK; |
3432 } | 3435 } |
3433 | 3436 |
3434 | 3437 |