comparison src/http/ngx_http_special_response.c @ 165:894a01c6aea3

nginx-0.0.1-2003-10-29-20:39:05 import
author Igor Sysoev <igor@sysoev.ru>
date Wed, 29 Oct 2003 17:39:05 +0000
parents 84036764e215
children c0552e5ab567
comparison
equal deleted inserted replaced
164:84036764e215 165:894a01c6aea3
222 ngx_http_add_header(&r->headers_out, ngx_http_headers_out))) 222 ngx_http_add_header(&r->headers_out, ngx_http_headers_out)))
223 { 223 {
224 return NGX_ERROR; 224 return NGX_ERROR;
225 } 225 }
226 226
227 r->headers_out.content_type->key.len = 12; 227 r->headers_out.content_type->key.len = sizeof("Content-Type") - 1;
228 r->headers_out.content_type->key.data = "Content-Type"; 228 r->headers_out.content_type->key.data = "Content-Type";
229 r->headers_out.content_type->value.len = 9; 229 r->headers_out.content_type->value.len = sizeof("text/html") - 1;
230 r->headers_out.content_type->value.data = "text/html"; 230 r->headers_out.content_type->value.data = "text/html";
231 231
232 } else { 232 } else {
233 r->headers_out.content_length_n = -1; 233 r->headers_out.content_length_n = -1;
234 }
235
236 if (r->headers_out.content_length) {
237 r->headers_out.content_length->key.len = 0;
234 r->headers_out.content_length = NULL; 238 r->headers_out.content_length = NULL;
235 } 239 }
236 240
237 rc = ngx_http_send_header(r); 241 rc = ngx_http_send_header(r);
238 242