diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-01-15 07:02:27 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-01-15 07:02:27 +0000 |
commit | ad22e01112003ec8600f3e1f6ef184fc18a69bc8 (patch) | |
tree | 98981830393636b259e91f935fb017ff41c4b94e /src/http/ngx_http_special_response.c | |
parent | e79c6ac7b271cab208cd3295a833e4d9c8b9460b (diff) | |
download | nginx-ad22e01112003ec8600f3e1f6ef184fc18a69bc8.tar.gz nginx-ad22e01112003ec8600f3e1f6ef184fc18a69bc8.zip |
nginx-0.0.1-2003-01-15-10:02:27 import
Diffstat (limited to 'src/http/ngx_http_special_response.c')
-rw-r--r-- | src/http/ngx_http_special_response.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c index b458f5973..4e5e3b251 100644 --- a/src/http/ngx_http_special_response.c +++ b/src/http/ngx_http_special_response.c @@ -33,6 +33,13 @@ static char error_404_page[] = "<center><h1>404 Not Found</h1></center>" CRLF ; +static char error_500_page[] = +"<html>" CRLF +"<head><title>500 Internal Server Error</title></head>" CRLF +"<body bgcolor=\"white\">" CRLF +"<center><h1>500 Internal Server Error</h1></center>" CRLF +; + static ngx_str_t error_pages[] = { { 0, NULL}, /* 301 */ @@ -46,7 +53,7 @@ static ngx_str_t error_pages[] = { { sizeof(error_403_page) - 1, error_403_page }, { sizeof(error_404_page) - 1, error_404_page }, - { 0, NULL} /* 500 */ + { sizeof(error_500_page) - 1, error_500_page } }; int ngx_http_special_response(ngx_http_request_t *r, int error) @@ -65,7 +72,7 @@ int ngx_http_special_response(ngx_http_request_t *r, int error) err = error - NGX_HTTP_BAD_REQUEST + 4; else - err = NGX_HTTP_INTERNAL_SERVER_ERROR + 4 + 5; + err = error - NGX_HTTP_INTERNAL_SERVER_ERROR + 4 + 5; if (error_pages[err].len == 0) r->headers_out.content_length = -1; |