add charset for ngx_http_gzip_static_module responses

This commit is contained in:
Igor Sysoev 2009-05-22 11:05:26 +00:00
parent a7021768a7
commit 93c483e0c5
3 changed files with 4 additions and 1 deletions

View File

@ -224,7 +224,8 @@ ngx_http_charset_header_filter(ngx_http_request_t *r)
if (r == r->main) {
if (r->headers_out.content_encoding
if (!r->ignore_content_encoding
&& r->headers_out.content_encoding
&& r->headers_out.content_encoding->value.len)
{
return ngx_http_next_header_filter(r);

View File

@ -205,6 +205,7 @@ ngx_http_gzip_static_handler(ngx_http_request_t *r)
h->value.data = (u_char *) "gzip";
r->headers_out.content_encoding = h;
r->ignore_content_encoding = 1;
/* we need to allocate all before the header would be sent */

View File

@ -478,6 +478,7 @@ struct ngx_http_request_s {
unsigned discard_body:1;
unsigned internal:1;
unsigned error_page:1;
unsigned ignore_content_encoding:1;
unsigned filter_finalize:1;
unsigned post_action:1;
unsigned request_complete:1;