diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2011-11-01 14:15:42 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2011-11-01 14:15:42 +0000 |
| commit | d66f8ae6346fded952cb4f441232212d1eeac880 (patch) | |
| tree | 8d6dc1b77372c702a6b3ea1e2e5a2421e794c83f | |
| parent | a1db86a30b82de2286d32f3ebf71de340d22e2d1 (diff) | |
| download | nginx-d66f8ae6346fded952cb4f441232212d1eeac880.tar.gz nginx-d66f8ae6346fded952cb4f441232212d1eeac880.tar.bz2 | |
Merging r4189, r4197:
Perl related fixes:
*) Handling of Content-Encoding set from perl.
This fixes double gzipping in case of gzip filter being enabled while perl
returns already gzipped response.
*) Fixed macro name.
| -rw-r--r-- | src/http/modules/perl/nginx.xs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs index 035e261eb..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) @@ -836,7 +843,7 @@ variable(r, name, value = NULL) var.len = len; var.data = lowcase; - #if (NGX_LOG_DEBUG) + #if (NGX_DEBUG) if (value) { ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
