Source: nginx
Version: 1.6.2-5
Tags: patch jessie sid experimental

Hi,

None of the currently available nginx packages (-light, -full, -extras)
have the HTTP Gunzip module[1] enabled. All that is needed for this
module to be included is a --with-http_gunzip_module switch.

Please consider enabling it. People have already reported the need for
it[2] and the official response is "use nginx' upstream repository".
For a comparison of the "official" nginx upstream repositories and the
Debian packages, see my user page[3].

Enabling support for gunzip enables the HTTP Substitution module to
replace data in a gzip-compressed page. Without this module, HTTP
compression has to be disabled or the substitution filter will fail.
This unfortunately leads to reduced throughput.

The official documentation[1] describes a use case, I have another one
where a nginx in a LAN has to rewrite some data. Without gunzip, I
forcefully have to disable HTTP compression. Simplified configuration:

    proxy_http_version 1.1;
    proxy_set_header Accept-Encoding "";
    sub_filter '<title>' '<title>TEST: ';
    proxy_pass http://$http_host$request_uri;

With gunzip enabled, this can be used instead:

    proxy_http_version 1.1;
    gunzip on;
    gzip_disable ".";
    sub_filter '<title>' '<title>TEST: ';
    proxy_pass http://$http_host$request_uri;

(gzip_disable is needed because the author of gunzip had a different use
case in mind. Without this option, as an optimization nginx does not
decompress the proxied data for a client which breaks the substitution
filter.)

Since the Gzip module is already enabled for nginx-full and
nginx-extras, please consider enabling it for both of them. Otherwise,
please enable it just for nginx-extras if you think that the use cases
are rare. The attached patch is based on the collab-maint repo and
tested on Wheezy-backports (and on a half-upgraded Jessie image as well
:-)).
-- 
Kind regards,
Peter Wu
https://lekensteyn.nl

 [1]: http://nginx.org/en/docs/http/ngx_http_gunzip_module.html
 [2]: http://forum.nginx.org/read.php?2,255733,255733
 [3]: https://wiki.debian.org/PeterWu/Nginx
 [4]: https://www.ruby-forum.com/topic/206497
From 6df2689b808111603229e08aab4d9236a94de034 Mon Sep 17 00:00:00 2001
From: Peter Wu <pe...@lekensteyn.nl>
Date: Mon, 6 Apr 2015 23:16:18 +0200
Subject: [PATCH] Enable gunzip module for full and extras

This is the only module not enabled in the nginx-extras package.

Official documentation:
http://nginx.org/en/docs/http/ngx_http_gunzip_module.html
---
 debian/control | 8 ++++----
 debian/rules   | 2 ++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/debian/control b/debian/control
index 58f951d..a691546 100644
--- a/debian/control
+++ b/debian/control
@@ -95,8 +95,8 @@ Description: nginx web/proxy server (standard version)
  nginx-extra).
  .
  STANDARD HTTP MODULES: Core, Access, Auth Basic, Auto Index, Browser,
- Charset, Empty GIF, FastCGI, Geo, Gzip, Headers, Index, Limit Requests,
- Limit Zone, Log, Map, Memcached, Proxy, Referer, Rewrite, SCGI,
+ Charset, Empty GIF, FastCGI, Geo, Gzip, Gunzip, Headers, Index, Limit
+ Requests, Limit Zone, Log, Map, Memcached, Proxy, Referer, Rewrite, SCGI,
  Split Clients, SSI, Upstream, User ID, UWSGI.
  .
  OPTIONAL HTTP MODULES: Addition, Auth Request, Debug, GeoIP, Gzip
@@ -187,8 +187,8 @@ Description: nginx web/proxy server (extended version)
  Split Clients, SSI, Upstream, User ID, UWSGI.
  .
  OPTIONAL HTTP MODULES: Addition, Auth Request, Debug, Embedded Perl, FLV,
- GeoIP, Gzip Precompression, Image Filter, IPv6, MP4, Random Index, Real IP,
- Secure Link, Spdy, SSL, Stub Status, Substitution, WebDAV, XSLT.
+ GeoIP, Gzip Precompression, Gunzip, Image Filter, IPv6, MP4, Random Index,
+ Real IP, Secure Link, Spdy, SSL, Stub Status, Substitution, WebDAV, XSLT.
  .
  MAIL MODULES: Mail Core, IMAP, POP3, SMTP, SSL.
  .
diff --git a/debian/rules b/debian/rules
index e56a47c..ef2f013 100755
--- a/debian/rules
+++ b/debian/rules
@@ -71,6 +71,7 @@ full_configure_flags := \
 			--with-http_dav_module \
 			--with-http_geoip_module \
 			--with-http_gzip_static_module \
+			--with-http_gunzip_module \
 			--with-http_image_filter_module \
 			--with-http_spdy_module \
 			--with-http_sub_module \
@@ -90,6 +91,7 @@ extras_configure_flags := \
 			--with-http_flv_module \
 			--with-http_geoip_module \
 			--with-http_gzip_static_module \
+			--with-http_gunzip_module \
 			--with-http_image_filter_module \
 			--with-http_mp4_module \
 			--with-http_perl_module \
-- 
2.1.4

Attachment: signature.asc
Description: PGP signature

Reply via email to