Welcome! Log In Create A New Profile

Advanced

Re: Please helpe me, hacking the module Gzip Pre-Compression Module

Maxim Dounin
December 14, 2012 12:58PM
Hello!

On Fri, Dec 14, 2012 at 12:29:15PM -0500, vvpham wrote:

> Hello,
> I wrote to Igor but do not have the response so I write my question here and
> please help me.
>
> Firse of all, excuse me for my bad english!!!!!
>
> I hack the module "ngx_http_gzip_static_module.c" and I know that if client
> demande a file A, for example, the server NGINX will search the file "A.gz"
> and if it exist, Server will uncompress this gz file and the Server will
> serve the file uncompress of A.gz.

This is incorrect. The gzip_static assumes there are two files
with identical contents:

foo
foo.gz

The "foo" file (uncompressed one) will be returned to clients
which doesn't support gzip. The "foo.gz" file (compressed one)
will be returned to clients which support gzip.

If you want nginx to uncompress a gz file, you have to use
recently introduced gunzip module, see http://nginx.org/r/gunzip,
along with gzip_static set to "always".

> It is not my objectif. My objectif is if a client demande a file B, for
> example. The server will search the file B.gz(compressed file) and serve
> this file if it exists. Client will receive file B.gz, not file B
> uncompressed.
>
> I lost for weeks for hacking this function but do not success. Please help
> me to figure out how I can realize this.

I'm not sure I understand correctly what you want, but it looks
like what you are asking for is "gzip_static always", as available
in nginx 1.3.6+. See http://nginx.org/r/gzip_static for details.

--
Maxim Dounin
http://nginx.com/support.html

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

Please helpe me, hacking the module Gzip Pre-Compression Module

vvpham December 14, 2012 12:29PM

Re: Please helpe me, hacking the module Gzip Pre-Compression Module

Maxim Dounin December 14, 2012 12:58PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 291
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready