Welcome! Log In Create A New Profile


Upstream Accept-Ranges not being respected?

Zach Rait
November 26, 2010 07:30AM
Hi folks,

I'm using 0.8.53, and I've been running into an issue with the Accepts-Range
header coupled with X-Accel-Redirect. I'm proxying all non-static requests
to an upstream pool which when passed a particular one-time-use URL will set
X-Accel-Redirect to an internal location to allow the client to download a
protected file. However, despite setting "Accept-Ranges: none" in the
upstream server, nginx is appending a second "Append-Ranges: bytes" header
before hitting the client. This results in the client aborting the initial
download and making several partial followup range requests (which obviously
don't succeed as the URL they're hitting can only resolve once). I've tried
manually setting Accept-Ranges for the internal location, but that just
results in a third Accept-Ranges header being sent to the client in the
initial response. I've even tried completely clearing the Accept-Ranges
headers with ngx_headers_more, but even that failed.

It seems to me like the correct behavior here would be to respect the
upstream server's Accept-Ranges header if it's been set (and preserve it
rather than appending to it) as any followup requests will be to the URL
that was proxied upstream and thus any range requests must be able to be
processed by the upstream servers to succeed.

nginx mailing list
Subject Author Posted

Upstream Accept-Ranges not being respected?

Zach Rait November 26, 2010 07:30AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

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