aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_special_response.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-04-08 15:40:10 +0000
committerIgor Sysoev <igor@sysoev.ru>2003-04-08 15:40:10 +0000
commite2a3154f0e3020e1f21f5a88b29daf8cc26e0dc5 (patch)
tree6198fc644d2efe9d10bab8b87004a70324d6cf5d /src/http/ngx_http_special_response.c
parent3f76ec190a3bd398c229deb0b4f298b9637a3129 (diff)
downloadnginx-e2a3154f0e3020e1f21f5a88b29daf8cc26e0dc5.tar.gz
nginx-e2a3154f0e3020e1f21f5a88b29daf8cc26e0dc5.zip
nginx-0.0.1-2003-04-08-19:40:10 import
Diffstat (limited to 'src/http/ngx_http_special_response.c')
-rw-r--r--src/http/ngx_http_special_response.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index 123418a83..6213c4f08 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -122,11 +122,22 @@ int ngx_http_special_response_handler(ngx_http_request_t *r, int error)
if (error < NGX_HTTP_BAD_REQUEST) {
err = error - NGX_HTTP_MOVED_PERMANENTLY;
- } else if (error < NGX_HTTP_INTERNAL_SERVER_ERROR) {
- err = error - NGX_HTTP_BAD_REQUEST + 3;
-
} else {
- err = error - NGX_HTTP_INTERNAL_SERVER_ERROR + 3 + 17;
+ ngx_test_null(r->headers_out.content_type,
+ ngx_push_table(r->headers_out.headers),
+ NGX_HTTP_INTERNAL_SERVER_ERROR);
+
+ r->headers_out.content_type->key.len = 12;
+ r->headers_out.content_type->key.data = "Content-Type";
+ r->headers_out.content_type->value.len = 9;
+ r->headers_out.content_type->value.data = "text/html";
+
+ if (error < NGX_HTTP_INTERNAL_SERVER_ERROR) {
+ err = error - NGX_HTTP_BAD_REQUEST + 3;
+
+ } else {
+ err = error - NGX_HTTP_INTERNAL_SERVER_ERROR + 3 + 17;
+ }
}
if (r->keepalive != 0) {