diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2011-10-11 18:01:38 +0000 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2011-10-11 18:01:38 +0000 |
| commit | 012e6b63780834c90e74f89fa7e0365310bf9904 (patch) | |
| tree | e792ddb72e6b0c49a564f3600b70b9b49c39714c /src | |
| parent | 0f5f4cb1805e70c8fab3bcd13e18ad24670b47ba (diff) | |
| download | nginx-012e6b63780834c90e74f89fa7e0365310bf9904.tar.gz nginx-012e6b63780834c90e74f89fa7e0365310bf9904.tar.bz2 | |
Handling of Content-Encoding set from perl.
This fixes double gzipping in case of gzip filter being enabled while perl
returns already gzipped response.
Diffstat (limited to 'src')
| -rw-r--r-- | src/http/modules/perl/nginx.xs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs index c07118bb6..e3a9dd5c9 100644 --- a/src/http/modules/perl/nginx.xs +++ b/src/http/modules/perl/nginx.xs @@ -474,6 +474,13 @@ header_out(r, key, value) r->headers_out.content_length = header; } + if (header->key.len == sizeof("Content-Encoding") - 1 + && ngx_strncasecmp(header->key.data, "Content-Encoding", + sizeof("Content-Encoding") - 1) == 0) + { + r->headers_out.content_encoding = header; + } + void filename(r) |
