[Bug] X-Accel-Redirect
Maxim Dounin
mdounin at mdounin.ru
Wed Sep 8 19:11:46 MSD 2010
Hello!
On Wed, Sep 08, 2010 at 09:53:14AM -0400, rovervr wrote:
> Hi everyone,
>
> I got a server which serves Data to a client ( in my case MP3s ). The
> MP3s are saved in a storage directory in the form Artist - Title.mp3
>
> I'm using X-Accel-Redirect to serve the files from the storage dir to
> the user. This workes fine for most cases but fails for special chars
> like the question mark. I already tried encoding it - but the char
> always gets stripped like in Query strings. But since it's not an url
> I'm providing no stripping should take place. Here are my results:
X-Accel-Redirects expects URI, but unescaped one. This was
last discussed yesterday:
http://nginx.org/pipermail/nginx/2010-September/022384.html
Quote:
X-Accel-Redirect expected to contain non-encoded URI. This isn't
really right, but it's how it currently works.
In particular this makes impossible to (normally) serve resources
with '?' in name as you see in your tests, as anything after '?'
is treated as query string.
Correct fix would be to change X-Accel-Redirect to accept escaped
URI instead. I believe patches are welcome.
Maxim Dounin
More information about the nginx
mailing list