# HG changeset patch # User Igor Sysoev # Date 1218618013 0 # Node ID 20a7fc523aecec5a46c04f90a22610baa1501c8a # Parent 11c59ecbd04f41519ed35d7ccfd79aad4f94b228 disable error_page loop in 500 error when recursive errors are enabled diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -371,7 +371,7 @@ ngx_http_special_response_handler(ngx_ht clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); - if (!r->error_page && clcf->error_pages) { + if (!r->error_page && clcf->error_pages && r->uri_changes != 0) { if (clcf->recursive_error_pages == 0) { r->error_page = 1;