Nicholas Sherlock
September 07, 2010 07:52PM
On 8/09/2010 3:20 a.m., gustavo wrote:
> I'm using the X-Accel-Redirect feature in Nginx, but it fails to send
> some files (returning a 404) because it does not URL-decode the
> requested path. It does work when the file name need not be
> URL-decoded.
>
> So, for example, I have a file called "Mudança_Climática.pdf" in
> /srv/static (whose URL alias on Nginx is "/internal/static"), my
> application would set the X-Accel-Redirect header to:
> X-Accel-Redirect: /internal/static/Mudan%C3%A7a_Clim%C3%A1tica.pdf
>
> But then, Nginx will try to look up that file in the filesystem as:
> /srv/static/Mudan%C3%A7a_Clim%C3%A1tica.pdf
>
> However, if I requested "Climate_Change.pdf", it works.

Doesn't the HTTP Location header work the same way, i.e. doesn't apply
URL decoding?

Cheers,
Nicholas Sherlock


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

X-Accel-Redirect doesn't URL-decode paths

gustavo September 07, 2010 11:20AM

Re: X-Accel-Redirect doesn't URL-decode paths

Maxim Dounin September 07, 2010 11:50AM

Re: X-Accel-Redirect doesn't URL-decode paths

gustavo September 07, 2010 11:55AM

Re: X-Accel-Redirect doesn't URL-decode paths

Nicholas Sherlock September 07, 2010 07:52PM

Re: X-Accel-Redirect doesn't URL-decode paths

Nicholas Sherlock September 07, 2010 07:58PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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