diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-01-15 13:10:45 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-01-15 13:10:45 +0000 |
commit | f7204173f9ae20a2d3c647fc99e2dc1bbcf337b9 (patch) | |
tree | 346d0a654288c44395816b93e3446e60f5167248 | |
parent | 77a797436df0e975acc4ba83eaf77d56016593c1 (diff) | |
download | nginx-f7204173f9ae20a2d3c647fc99e2dc1bbcf337b9.tar.gz nginx-f7204173f9ae20a2d3c647fc99e2dc1bbcf337b9.zip |
in miss case memcached module returned END instead of default 404 page body
the bug has been introduced in r2269
-rw-r--r-- | src/http/ngx_http_upstream.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index f567a438e..ace467f25 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -1441,11 +1441,6 @@ ngx_http_upstream_test_next(ngx_http_request_t *r, ngx_http_upstream_t *u) return NGX_OK; } - if (status == NGX_HTTP_NOT_FOUND && u->conf->intercept_404) { - ngx_http_upstream_finalize_request(r, u, NGX_HTTP_NOT_FOUND); - return NGX_OK; - } - #if (NGX_HTTP_CACHE) if (u->peer.tries == 0 && u->stale && (u->conf->use_stale & un->mask)) { @@ -1471,6 +1466,13 @@ ngx_http_upstream_intercept_errors(ngx_http_request_t *r, ngx_http_err_page_t *err_page; ngx_http_core_loc_conf_t *clcf; + status = u->headers_in.status_n; + + if (status == NGX_HTTP_NOT_FOUND && u->conf->intercept_404) { + ngx_http_upstream_finalize_request(r, u, NGX_HTTP_NOT_FOUND); + return NGX_OK; + } + if (!u->conf->intercept_errors) { return NGX_DECLINED; } @@ -1481,8 +1483,6 @@ ngx_http_upstream_intercept_errors(ngx_http_request_t *r, return NGX_DECLINED; } - status = u->headers_in.status_n; - err_page = clcf->error_pages->elts; for (i = 0; i < clcf->error_pages->nelts; i++) { |