comparison src/http/ngx_http_special_response.c @ 226:21f2ace7c936 NGINX_0_3_60

nginx 0.3.60 *) Bugfix: a worker process may got caught in an endless loop while an error redirection; bug appeared in 0.3.59.
author Igor Sysoev <http://sysoev.ru>
date Fri, 18 Aug 2006 00:00:00 +0400
parents 9909a161eb28
children 9eebc1b2cdbb
comparison
equal deleted inserted replaced
225:d91e823fa629 226:21f2ace7c936
310 if (rc == NGX_HTTP_INTERNAL_SERVER_ERROR) { 310 if (rc == NGX_HTTP_INTERNAL_SERVER_ERROR) {
311 error = NGX_HTTP_INTERNAL_SERVER_ERROR; 311 error = NGX_HTTP_INTERNAL_SERVER_ERROR;
312 } 312 }
313 313
314 r->headers_out.status = error; 314 r->headers_out.status = error;
315 r->err_status = error;
315 316
316 if (r->keepalive != 0) { 317 if (r->keepalive != 0) {
317 switch (error) { 318 switch (error) {
318 case NGX_HTTP_BAD_REQUEST: 319 case NGX_HTTP_BAD_REQUEST:
319 case NGX_HTTP_REQUEST_ENTITY_TOO_LARGE: 320 case NGX_HTTP_REQUEST_ENTITY_TOO_LARGE:
338 339
339 r->headers_out.content_type.len = 0; 340 r->headers_out.content_type.len = 0;
340 341
341 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 342 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
342 343
343 if (clcf->error_pages) { 344 if (r->uri_changes && clcf->error_pages) {
344 345
345 err_page = clcf->error_pages->elts; 346 err_page = clcf->error_pages->elts;
346 347
347 for (i = 0; i < clcf->error_pages->nelts; i++) { 348 for (i = 0; i < clcf->error_pages->nelts; i++) {
348 349