[PATCH] Add Range support with gzip filter output

Maxim Dounin mdounin at mdounin.ru
Fri May 3 22:35:04 UTC 2013


Hello!

On Fri, May 03, 2013 at 10:51:58AM +0800, xunen wrote:

> Hello,
> 
> in case of gzip filter output for range header request(Range: start-end),
> range module is not work, attached patch fixes this.

This is expected behaviour.  With gzipping on the fly via gzip 
filter result is not something stable - it may change depending on 
various settings, as well as various timing factors.  Consider 
e.g. proxied response with proxy_buffering set to off - each 
buffer passed to the gzip filter will have flush flag set, and 
gzipped response will depend on speed of a network to an upstream 
server, and on an nginx server load.  This makes gzip filter 
results unsuitable for byterange requests.

Additionally, moving range filter in the filter chain as your 
patch does is very bad idea from performance point of view.

-- 
Maxim Dounin
http://nginx.org/en/donation.html



More information about the nginx-devel mailing list