<div>Hi folks,</div><div><br></div><meta charset="utf-8"><div>I&#39;m using 0.8.53, and I&#39;ve been running into an issue with the Accepts-Range header coupled with X-Accel-Redirect. I&#39;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 &quot;Accept-Ranges: none&quot; in the upstream server, nginx is appending a second &quot;Append-Ranges: bytes&quot; header before hitting the client. This results in the client aborting the initial download and making several partial followup range requests (which obviously don&#39;t succeed as the URL they&#39;re hitting can only resolve once). I&#39;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&#39;ve even tried completely clearing the Accept-Ranges headers with ngx_headers_more, but even that failed.</div>

<div><br></div><div>It seems to me like the correct behavior here would be to respect the upstream server&#39;s Accept-Ranges header if it&#39;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.</div>

<div><br></div><div>Thanks,</div><div>Zach</div>