Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-10-29 20:39:05 +0300
committerIgor Sysoev <igor@sysoev.ru>2003-10-29 20:39:05 +0300
commit14be46ee9862352fc055da8005e9bdf3dd1bc16e (patch)
tree6c17dac364e25c5b5bacce1188a5bb73d01b9c87 /src/http/ngx_http_special_response.c
parentb5faed2dc853ee7e6bda6004b16ceedc6c194641 (diff)
nginx-0.0.1-2003-10-29-20:39:05 import
Diffstat (limited to 'src/http/ngx_http_special_response.c')
-rw-r--r--src/http/ngx_http_special_response.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index 8f9d8ce7d..017376a5b 100644
--- 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(ngx_http_request_t *r, int error)
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;
}