Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_gzip_static_module.c @ 5698:fcb0420f90de
Charset filter: fixed charset setting on encoded replies.
If response is gzipped we can't recode response, but in case it's not
needed we still can add charset to Content-Type.
The r->ignore_content_encoding is dropped accordingly, charset with gzip_static
now properly works without any special flags.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 19 May 2014 22:45:34 +0400 |
parents | ceecde39853f |
children | a72886067bbb |
comparison
equal
deleted
inserted
replaced
5697:c985d90a8d1f | 5698:fcb0420f90de |
---|---|
244 h->hash = 1; | 244 h->hash = 1; |
245 ngx_str_set(&h->key, "Content-Encoding"); | 245 ngx_str_set(&h->key, "Content-Encoding"); |
246 ngx_str_set(&h->value, "gzip"); | 246 ngx_str_set(&h->value, "gzip"); |
247 r->headers_out.content_encoding = h; | 247 r->headers_out.content_encoding = h; |
248 | 248 |
249 r->ignore_content_encoding = 1; | |
250 | |
251 /* we need to allocate all before the header would be sent */ | 249 /* we need to allocate all before the header would be sent */ |
252 | 250 |
253 b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); | 251 b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); |
254 if (b == NULL) { | 252 if (b == NULL) { |
255 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 253 return NGX_HTTP_INTERNAL_SERVER_ERROR; |