diff 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
line wrap: on
line diff
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -224,13 +224,17 @@ int ngx_http_special_response_handler(ng
             return NGX_ERROR;
         }
 
-        r->headers_out.content_type->key.len = 12;
+        r->headers_out.content_type->key.len = sizeof("Content-Type") - 1;
         r->headers_out.content_type->key.data = "Content-Type";
-        r->headers_out.content_type->value.len = 9;
+        r->headers_out.content_type->value.len = sizeof("text/html") - 1;
         r->headers_out.content_type->value.data = "text/html";
 
     } else {
         r->headers_out.content_length_n = -1;
+    }
+
+    if (r->headers_out.content_length) {
+        r->headers_out.content_length->key.len = 0;
         r->headers_out.content_length = NULL;
     }