comparison src/http/ngx_http_special_response.c @ 71:59229033ae93

nginx-0.0.1-2003-04-08-19:40:10 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 08 Apr 2003 15:40:10 +0000
parents e43f406e4525
children 674d333f4296
comparison
equal deleted inserted replaced
70:e320bf51c4e3 71:59229033ae93
120 r->headers_out.status = error; 120 r->headers_out.status = error;
121 121
122 if (error < NGX_HTTP_BAD_REQUEST) { 122 if (error < NGX_HTTP_BAD_REQUEST) {
123 err = error - NGX_HTTP_MOVED_PERMANENTLY; 123 err = error - NGX_HTTP_MOVED_PERMANENTLY;
124 124
125 } else if (error < NGX_HTTP_INTERNAL_SERVER_ERROR) { 125 } else {
126 err = error - NGX_HTTP_BAD_REQUEST + 3; 126 ngx_test_null(r->headers_out.content_type,
127 ngx_push_table(r->headers_out.headers),
128 NGX_HTTP_INTERNAL_SERVER_ERROR);
127 129
128 } else { 130 r->headers_out.content_type->key.len = 12;
129 err = error - NGX_HTTP_INTERNAL_SERVER_ERROR + 3 + 17; 131 r->headers_out.content_type->key.data = "Content-Type";
132 r->headers_out.content_type->value.len = 9;
133 r->headers_out.content_type->value.data = "text/html";
134
135 if (error < NGX_HTTP_INTERNAL_SERVER_ERROR) {
136 err = error - NGX_HTTP_BAD_REQUEST + 3;
137
138 } else {
139 err = error - NGX_HTTP_INTERNAL_SERVER_ERROR + 3 + 17;
140 }
130 } 141 }
131 142
132 if (r->keepalive != 0) { 143 if (r->keepalive != 0) {
133 switch (error) { 144 switch (error) {
134 case NGX_HTTP_BAD_REQUEST: 145 case NGX_HTTP_BAD_REQUEST: