Welcome! Log In Create A New Profile

Advanced

[PATCH] Correctly handle Content-Encoding set from perl

Maxim Dounin
December 21, 2009 06:10PM
# HG changeset patch
# User Maxim Dounin <mdounin@mdounin.ru>
# Date 1261436632 -10800
# Node ID 798c007ce2aca62db1de752db1b12ca5516131c6
# Parent 72104cd120ece09b3004261b2a29ace3e0aab812
Correctly handle Content-Encoding set from perl.

This fixes double gzipping in case gzip filter enabled while perl
returns already gzipped response.

diff --git a/src/http/modules/perl/nginx.xs b/src/http/modules/perl/nginx.xs
--- 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)

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Correctly handle Content-Encoding set from perl

Maxim Dounin 2761 December 21, 2009 06:10PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 90
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready