From 012e6b63780834c90e74f89fa7e0365310bf9904 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Tue, 11 Oct 2011 18:01:38 +0000 Subject: Handling of Content-Encoding set from perl. This fixes double gzipping in case of gzip filter being enabled while perl returns already gzipped response. --- src/http/modules/perl/nginx.xs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/http/modules') 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) -- cgit