Mercurial > hg > nginx
changeset 2882:896db5a09bd2
reset content_type hash value, this fixes a bug when XSLT responses
could not be processed by SSI, charset, and gzip filters
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 25 May 2009 09:06:29 +0000 |
parents | 13b63d682228 |
children | d0cba58e5bfa |
files | src/http/modules/ngx_http_image_filter_module.c src/http/modules/ngx_http_range_filter_module.c src/http/modules/ngx_http_xslt_filter_module.c src/http/ngx_http_special_response.c src/http/ngx_http_upstream.c |
diffstat | 5 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_image_filter_module.c Mon May 25 09:00:35 2009 +0000 +++ b/src/http/modules/ngx_http_image_filter_module.c Mon May 25 09:06:29 2009 +0000 @@ -282,6 +282,7 @@ ct = &ngx_http_image_types[ctx->type - 1]; r->headers_out.content_type_len = ct->len; r->headers_out.content_type = *ct; + r->headers_out.content_type_lowcase = NULL; if (conf->filter == NGX_HTTP_IMAGE_TEST) { ctx->phase = NGX_HTTP_IMAGE_PASS; @@ -502,6 +503,7 @@ r->headers_out.status = NGX_HTTP_OK; r->headers_out.content_type.len = sizeof("text/plain") - 1; r->headers_out.content_type.data = (u_char *) "text/plain"; + r->headers_out.content_type_lowcase = NULL; if (ctx == NULL) { b->pos = (u_char *) "{}" CRLF;
--- a/src/http/modules/ngx_http_range_filter_module.c Mon May 25 09:00:35 2009 +0000 +++ b/src/http/modules/ngx_http_range_filter_module.c Mon May 25 09:06:29 2009 +0000 @@ -456,6 +456,8 @@ return NGX_ERROR; } + r->headers_out.content_type_lowcase = NULL; + /* "Content-Type: multipart/byteranges; boundary=0123456789" */ r->headers_out.content_type.len = @@ -464,6 +466,7 @@ boundary) - r->headers_out.content_type.data; + r->headers_out.content_type_len = r->headers_out.content_type.len; /* the size of the last boundary CRLF "--0123456789--" CRLF */
--- a/src/http/modules/ngx_http_xslt_filter_module.c Mon May 25 09:00:35 2009 +0000 +++ b/src/http/modules/ngx_http_xslt_filter_module.c Mon May 25 09:06:29 2009 +0000 @@ -837,6 +837,8 @@ r->headers_out.content_type.data = (u_char *) "text/html"; } + r->headers_out.content_type_lowcase = NULL; + return b; }
--- a/src/http/ngx_http_special_response.c Mon May 25 09:00:35 2009 +0000 +++ b/src/http/ngx_http_special_response.c Mon May 25 09:06:29 2009 +0000 @@ -610,6 +610,7 @@ r->headers_out.content_type_len = sizeof("text/html") - 1; r->headers_out.content_type.len = sizeof("text/html") - 1; r->headers_out.content_type.data = (u_char *) "text/html"; + r->headers_out.content_type_lowcase = NULL; } else { r->headers_out.content_length_n = -1; @@ -712,6 +713,7 @@ r->headers_out.content_type_len = sizeof("text/html") - 1; r->headers_out.content_type.len = sizeof("text/html") - 1; r->headers_out.content_type.data = (u_char *) "text/html"; + r->headers_out.content_type_lowcase = NULL; r->headers_out.location->hash = 0; r->headers_out.location = NULL;
--- a/src/http/ngx_http_upstream.c Mon May 25 09:00:35 2009 +0000 +++ b/src/http/ngx_http_upstream.c Mon May 25 09:06:29 2009 +0000 @@ -3174,6 +3174,7 @@ r->headers_out.content_type_len = h->value.len; r->headers_out.content_type = h->value; + r->headers_out.content_type_lowcase = NULL; for (p = h->value.data; *p; p++) {