Mercurial > hg > nginx
comparison src/http/ngx_http_special_response.c @ 162:96993d4d5067
nginx-0.0.1-2003-10-28-00:01:00 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 27 Oct 2003 21:01:00 +0000 |
parents | 88abd07d9f62 |
children | 84036764e215 |
comparison
equal
deleted
inserted
replaced
161:88abd07d9f62 | 162:96993d4d5067 |
---|---|
76 "<body bgcolor=\"white\">" CRLF | 76 "<body bgcolor=\"white\">" CRLF |
77 "<center><h1>408 Request Time-out</h1></center>" CRLF | 77 "<center><h1>408 Request Time-out</h1></center>" CRLF |
78 ; | 78 ; |
79 | 79 |
80 | 80 |
81 static char error_413_page[] = | |
82 "<html>" CRLF | |
83 "<head><title>413 Request Entity Too Large</title></head>" CRLF | |
84 "<body bgcolor=\"white\">" CRLF | |
85 "<center><h1>413 Request Entity Too Large</h1></center>" CRLF | |
86 ; | |
87 | |
88 | |
81 static char error_414_page[] = | 89 static char error_414_page[] = |
82 "<html>" CRLF | 90 "<html>" CRLF |
83 "<head><title>414 Request-URI Too Large</title></head>" CRLF | 91 "<head><title>414 Request-URI Too Large</title></head>" CRLF |
84 "<body bgcolor=\"white\">" CRLF | 92 "<body bgcolor=\"white\">" CRLF |
85 "<center><h1>414 Request-URI Too Large</h1></center>" CRLF | 93 "<center><h1>414 Request-URI Too Large</h1></center>" CRLF |
105 static char error_502_page[] = | 113 static char error_502_page[] = |
106 "<html>" CRLF | 114 "<html>" CRLF |
107 "<head><title>502 Bad Gateway</title></head>" CRLF | 115 "<head><title>502 Bad Gateway</title></head>" CRLF |
108 "<body bgcolor=\"white\">" CRLF | 116 "<body bgcolor=\"white\">" CRLF |
109 "<center><h1>502 Bad Gateway</h1></center>" CRLF | 117 "<center><h1>502 Bad Gateway</h1></center>" CRLF |
118 ; | |
119 | |
120 | |
121 static char error_503_page[] = | |
122 "<html>" CRLF | |
123 "<head><title>503 Service Temporarily Unavailable</title></head>" CRLF | |
124 "<body bgcolor=\"white\">" CRLF | |
125 "<center><h1>503 Service Temporarily Unavailable</h1></center>" CRLF | |
110 ; | 126 ; |
111 | 127 |
112 | 128 |
113 static char error_504_page[] = | 129 static char error_504_page[] = |
114 "<html>" CRLF | 130 "<html>" CRLF |
135 ngx_string(error_408_page), | 151 ngx_string(error_408_page), |
136 ngx_null_string, /* 409 */ | 152 ngx_null_string, /* 409 */ |
137 ngx_null_string, /* 410 */ | 153 ngx_null_string, /* 410 */ |
138 ngx_null_string, /* 411 */ | 154 ngx_null_string, /* 411 */ |
139 ngx_null_string, /* 412 */ | 155 ngx_null_string, /* 412 */ |
140 ngx_null_string, /* 413 */ | 156 ngx_string(error_413_page), |
141 ngx_string(error_414_page), | 157 ngx_string(error_414_page), |
142 ngx_null_string, /* 415 */ | 158 ngx_null_string, /* 415 */ |
143 ngx_string(error_416_page), | 159 ngx_string(error_416_page), |
144 | 160 |
145 ngx_string(error_500_page), | 161 ngx_string(error_500_page), |
146 ngx_null_string, /* 501 */ | 162 ngx_null_string, /* 501 */ |
147 ngx_string(error_502_page), | 163 ngx_string(error_502_page), |
148 ngx_null_string, /* 503 */ | 164 ngx_string(error_503_page), |
149 ngx_string(error_504_page) | 165 ngx_string(error_504_page) |
150 }; | 166 }; |
151 | 167 |
152 | 168 |
153 int ngx_http_special_response_handler(ngx_http_request_t *r, int error) | 169 int ngx_http_special_response_handler(ngx_http_request_t *r, int error) |
179 } | 195 } |
180 | 196 |
181 if (r->keepalive != 0) { | 197 if (r->keepalive != 0) { |
182 switch (error) { | 198 switch (error) { |
183 case NGX_HTTP_BAD_REQUEST: | 199 case NGX_HTTP_BAD_REQUEST: |
200 case NGX_HTTP_REQUEST_ENTITY_TOO_LARGE: | |
184 case NGX_HTTP_REQUEST_URI_TOO_LARGE: | 201 case NGX_HTTP_REQUEST_URI_TOO_LARGE: |
185 case NGX_HTTP_INTERNAL_SERVER_ERROR: | 202 case NGX_HTTP_INTERNAL_SERVER_ERROR: |
186 r->keepalive = 0; | 203 r->keepalive = 0; |
187 } | 204 } |
188 } | 205 } |