Changeset e7b311 for server/src/http/ngx_http_upstream.c
- Timestamp:
- 02/03/09 19:41:37 (3 years ago)
- Branches:
- master-v0.7, nginx-v0.7, nginx-v0.8, upstream_count_limit
- Children:
- 2ac4f5
- Parents:
- 2240a4
- git-author:
- George Potapov <nephrite@…> (02/03/09 19:41:37)
- git-committer:
- George Potapov <nephrite@…> (02/03/09 19:41:37)
- File:
-
- 1 edited
-
server/src/http/ngx_http_upstream.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
server/src/http/ngx_http_upstream.c
r814e69 re7b311 1442 1442 } 1443 1443 1444 if (status == NGX_HTTP_NOT_FOUND && u->conf->intercept_404) {1445 ngx_http_upstream_finalize_request(r, u, NGX_HTTP_NOT_FOUND);1446 return NGX_OK;1447 }1448 1449 1444 #if (NGX_HTTP_CACHE) 1450 1445 … … 1472 1467 ngx_http_core_loc_conf_t *clcf; 1473 1468 1469 status = u->headers_in.status_n; 1470 1471 if (status == NGX_HTTP_NOT_FOUND && u->conf->intercept_404) { 1472 ngx_http_upstream_finalize_request(r, u, NGX_HTTP_NOT_FOUND); 1473 return NGX_OK; 1474 } 1475 1474 1476 if (!u->conf->intercept_errors) { 1475 1477 return NGX_DECLINED; … … 1481 1483 return NGX_DECLINED; 1482 1484 } 1483 1484 status = u->headers_in.status_n;1485 1485 1486 1486 err_page = clcf->error_pages->elts; … … 2202 2202 ngx_http_upstream_process_request(ngx_http_request_t *r) 2203 2203 { 2204 ngx_uint_t del; 2204 2205 ngx_temp_file_t *tf; 2205 2206 ngx_event_pipe_t *p; … … 2213 2214 if (u->store) { 2214 2215 2216 del = p->upstream_error; 2217 2215 2218 tf = u->pipe->temp_file; 2216 2219 2217 if (p->upstream_eof 2218 && u->headers_in.status_n == NGX_HTTP_OK 2219 && (u->headers_in.content_length_n == -1 2220 || (u->headers_in.content_length_n == tf->offset))) 2221 { 2222 ngx_http_upstream_store(r, u); 2223 2224 } else if ((p->upstream_error 2225 || (p->upstream_eof 2226 && u->headers_in.status_n != NGX_HTTP_OK)) 2227 && tf->file.fd != NGX_INVALID_FILE) 2228 { 2220 if (p->upstream_eof) { 2221 2222 if (u->headers_in.status_n == NGX_HTTP_OK 2223 && (u->headers_in.content_length_n == -1 2224 || (u->headers_in.content_length_n == tf->offset))) 2225 { 2226 ngx_http_upstream_store(r, u); 2227 2228 } else { 2229 del = 1; 2230 } 2231 } 2232 2233 if (del && tf->file.fd != NGX_INVALID_FILE) { 2234 2229 2235 if (ngx_delete_file(tf->file.name.data) == NGX_FILE_ERROR) { 2230 2236
Note: See TracChangeset
for help on using the changeset viewer.
