Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 178:a8ff48d26cca
nginx-0.0.1-2003-11-11-00:09:22 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 10 Nov 2003 21:09:22 +0000 |
parents | 4db54fdbcbe7 |
children | 9f3a78b06c48 |
comparison
equal
deleted
inserted
replaced
177:4db54fdbcbe7 | 178:a8ff48d26cca |
---|---|
427 { | 427 { |
428 if (r->main) { | 428 if (r->main) { |
429 return NGX_OK; | 429 return NGX_OK; |
430 } | 430 } |
431 | 431 |
432 if (r->err_status) { | |
433 r->headers_out.status = r->err_status; | |
434 r->headers_out.status_line.len = 0; | |
435 } | |
436 | |
432 return (*ngx_http_top_header_filter)(r); | 437 return (*ngx_http_top_header_filter)(r); |
433 } | 438 } |
434 | 439 |
435 | 440 |
436 int ngx_http_redirect(ngx_http_request_t *r, int redirect) | 441 int ngx_http_redirect(ngx_http_request_t *r, int redirect) |
493 break; | 498 break; |
494 } | 499 } |
495 } | 500 } |
496 | 501 |
497 /* clear the modules contexts */ | 502 /* clear the modules contexts */ |
498 ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module); | 503 |
504 if (r->error_page) { | |
505 r->err_status = r->headers_out.status; | |
506 r->err_ctx = r->ctx; | |
507 r->ctx = ngx_pcalloc(r->pool, sizeof(void *) * ngx_http_max_module); | |
508 if (r->ctx == NULL) { | |
509 return NGX_HTTP_INTERNAL_SERVER_ERROR; | |
510 } | |
511 | |
512 } else { | |
513 ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module); | |
514 } | |
499 | 515 |
500 r->phase = 0; | 516 r->phase = 0; |
501 r->phase_handler = 0; | 517 r->phase_handler = 0; |
502 | 518 |
503 ngx_http_handler(r); | 519 ngx_http_handler(r); |