diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-05-25 13:06:29 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-05-25 13:06:29 +0400 |
commit | 60190068ab90c5b253c76b94c6c38d0b2489b15c (patch) | |
tree | 8365e9dd5d249b1629b230057312d52e5a6c6467 /src/http/modules | |
parent | 77fd67cc3884b29bce6bb40c68e1236e84f7c816 (diff) |
reset content_type hash value, this fixes a bug when XSLT responses
could not be processed by SSI, charset, and gzip filters
Diffstat (limited to 'src/http/modules')
-rw-r--r-- | src/http/modules/ngx_http_image_filter_module.c | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_range_filter_module.c | 3 | ||||
-rw-r--r-- | src/http/modules/ngx_http_xslt_filter_module.c | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_image_filter_module.c b/src/http/modules/ngx_http_image_filter_module.c index 9d480620e..293a61fc3 100644 --- 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_request_t *r, ngx_chain_t *in) 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, ngx_http_image_filter_ctx_t *ctx) 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; diff --git a/src/http/modules/ngx_http_range_filter_module.c b/src/http/modules/ngx_http_range_filter_module.c index f708c874b..bc2840831 100644 --- 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_request_t *r, 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_request_t *r, 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 */ diff --git a/src/http/modules/ngx_http_xslt_filter_module.c b/src/http/modules/ngx_http_xslt_filter_module.c index 220400c83..9703b50ae 100644 --- 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_request_t *r, r->headers_out.content_type.data = (u_char *) "text/html"; } + r->headers_out.content_type_lowcase = NULL; + return b; } |