Welcome! Log In Create A New Profile

Advanced

Re: reverse proxy + caching seems to break range requests

Maxim Dounin
April 04, 2010 05:24PM
Hello!

On Sun, Apr 04, 2010 at 11:23:32PM +0530, Vinay Y S wrote:

> Hi,
> I've configured nginx to run as a http reverse proxy with caching turned on
> for a location. The backend server supports range headers and responds
> correctly with 206 partial content response. This is needed to support
> pause/resume functionality in the browsers and download managers and also to
> support download accelerator clients.
>
> But with nginx reverse proxy with caching enabled, it seems to not work.
> nginx returns full response even when range header is present. Is this a
> known issue?
> Please help fix this.

nginx removes Range header (as well as several other headers)
before passing request to upstream to make sure full response will
be cached and other requests for the same uri will be served
correctly.

You may change this by adding appropriate headers into
proxy_cache_key and pass Range header via proxy_set_header
directive. E.g.

proxy_cache_key "$scheme$proxy_host$request_uri $http_range";
proxy_set_header Range $http_range;

See here for more details:

http://wiki.nginx.org/NginxHttpProxyModule#proxy_cache_key
http://wiki.nginx.org/NginxHttpProxyModule#proxy_set_header

Maxim Dounin

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

reverse proxy + caching seems to break range requests

Vinay Y S April 04, 2010 01:58PM

Re: reverse proxy + caching seems to break range requests

Maxim Dounin April 04, 2010 05:24PM

Re: reverse proxy + caching seems to break range requests

Vinay Y S April 05, 2010 04:46PM

Re: reverse proxy + caching seems to break range requests

Vinay Y S April 05, 2010 05:24PM

Re: reverse proxy + caching seems to break range requests

Maxim Dounin April 05, 2010 07:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 180
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