Welcome! Log In Create A New Profile


Multiple range request and proxy_force_ranges directive

December 18, 2018 11:46AM
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 https://forum.nginx.org/read.php?29,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,
Subject Author Posted

Multiple range request and proxy_force_ranges directive

traquila December 18, 2018 11:46AM

Re: Multiple range request and proxy_force_ranges directive

Maxim Dounin December 18, 2018 02:02PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 96
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready