Mercurial > hg > nginx-quic
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 +++ b/src/http/modules/ngx_http_image_filter_module.c @@ -282,6 +282,7 @@ ngx_http_image_body_filter(ngx_http_requ 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 @@ ngx_http_image_json(ngx_http_request_t * 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 +++ b/src/http/modules/ngx_http_range_filter_module.c @@ -456,6 +456,8 @@ ngx_http_range_multipart_header(ngx_http 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 @@ ngx_http_range_multipart_header(ngx_http 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 +++ b/src/http/modules/ngx_http_xslt_filter_module.c @@ -837,6 +837,8 @@ ngx_http_xslt_apply_stylesheet(ngx_http_ 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 +++ b/src/http/ngx_http_special_response.c @@ -610,6 +610,7 @@ ngx_http_send_special_response(ngx_http_ 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 @@ ngx_http_send_refresh(ngx_http_request_t 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 +++ b/src/http/ngx_http_upstream.c @@ -3174,6 +3174,7 @@ ngx_http_upstream_copy_content_type(ngx_ 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++) {