Multiple range request and proxy_force_ranges directive

traquila nginx-forum at
Tue Dec 18 16:46:54 UTC 2018

Hi everybody,

I have an issue with multiple range requests in a proxy_pass context.

When I want to support the HTTP range requests, I use to enable the
proxy_force_ranges directive in two cases:
- When the origin server does not support HTTP range
- When I want to download the full content from the origin (with
proxy_set_header Range "";)  and serve only the requested range.

However, this does not work for multiple ranges requests, as the
"single_range" flag is set by the proxy_force_ranges directive.
The flag comes from this old patch,248573,248573

When I change the code to remove the single_range flag in case of
force_ranges, everything works fine; but I am not sure of the edge effects.

if (u->conf->force_ranges) {
        r->allow_ranges = 1;
-       r->single_range = 1;
-        if (r->cached) {
-            r->single_range = 0;
-        }
- #endif

Thank you,

Posted at Nginx Forum:,282412,282412#msg-282412

More information about the nginx mailing list