Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 5298:a7b2db9119e0
Upstream: replaced u->pipe->temp_file with p->temp_file.
While here, redundant parentheses removed. No functional changes.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 25 Jul 2013 14:56:49 +0400 |
parents | 0ae9a2958886 |
children | b779728b180c |
comparison
equal
deleted
inserted
replaced
5297:0ae9a2958886 | 5298:a7b2db9119e0 |
---|---|
2980 | 2980 |
2981 if (u->store) { | 2981 if (u->store) { |
2982 | 2982 |
2983 if (p->upstream_eof || p->upstream_done) { | 2983 if (p->upstream_eof || p->upstream_done) { |
2984 | 2984 |
2985 tf = u->pipe->temp_file; | 2985 tf = p->temp_file; |
2986 | 2986 |
2987 if (u->headers_in.status_n == NGX_HTTP_OK | 2987 if (u->headers_in.status_n == NGX_HTTP_OK |
2988 && (u->headers_in.content_length_n == -1 | 2988 && (u->headers_in.content_length_n == -1 |
2989 || (u->headers_in.content_length_n == tf->offset))) | 2989 || u->headers_in.content_length_n == tf->offset)) |
2990 { | 2990 { |
2991 ngx_http_upstream_store(r, u); | 2991 ngx_http_upstream_store(r, u); |
2992 u->store = 0; | 2992 u->store = 0; |
2993 } | 2993 } |
2994 } | 2994 } |
2997 #if (NGX_HTTP_CACHE) | 2997 #if (NGX_HTTP_CACHE) |
2998 | 2998 |
2999 if (u->cacheable) { | 2999 if (u->cacheable) { |
3000 | 3000 |
3001 if (p->upstream_done) { | 3001 if (p->upstream_done) { |
3002 ngx_http_file_cache_update(r, u->pipe->temp_file); | 3002 ngx_http_file_cache_update(r, p->temp_file); |
3003 | 3003 |
3004 } else if (p->upstream_eof) { | 3004 } else if (p->upstream_eof) { |
3005 | 3005 |
3006 tf = u->pipe->temp_file; | 3006 tf = p->temp_file; |
3007 | 3007 |
3008 if (u->headers_in.content_length_n == -1 | 3008 if (u->headers_in.content_length_n == -1 |
3009 || u->headers_in.content_length_n | 3009 || u->headers_in.content_length_n |
3010 == tf->offset - (off_t) r->cache->body_start) | 3010 == tf->offset - (off_t) r->cache->body_start) |
3011 { | 3011 { |
3014 } else { | 3014 } else { |
3015 ngx_http_file_cache_free(r->cache, tf); | 3015 ngx_http_file_cache_free(r->cache, tf); |
3016 } | 3016 } |
3017 | 3017 |
3018 } else if (p->upstream_error) { | 3018 } else if (p->upstream_error) { |
3019 ngx_http_file_cache_free(r->cache, u->pipe->temp_file); | 3019 ngx_http_file_cache_free(r->cache, p->temp_file); |
3020 } | 3020 } |
3021 } | 3021 } |
3022 | 3022 |
3023 #endif | 3023 #endif |
3024 | 3024 |