Welcome! Log In Create A New Profile

Advanced

Re: URL Decoding problems

Maxim Dounin
January 17, 2012 10:52AM
Hello!

On Tue, Jan 17, 2012 at 01:49:13PM +0000, Alex Chamberlain wrote:

> Hi all,
>
> I've got a content handler that accesses request->uri. However, if the
> uri includes encoded forward slashes, these are collapsed into a
> single forward slash. Is this correct behaviour? I can understand
> collapsing multiple, unencoded slashes, but not encoded ones.
>
> (Very bad, first version) code is at
> https://github.com/alexchamberlain/nginx-qrcode.
>
> An example would be
> http://localhost/qr/http%3A%2F%2F%2Fwww.alexchamberlain.co.uk
>
> Any help greatly appreciated.

Right now nginx decodes URI to be able to work with it, in
particular - map it to a file system. Decoding of the "/" is most
questionable part of the process, but it's how it works now. If
you need original uri as provided by client - the one is available
via r->unparsed_uri.

Maxim Dounin

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

URL Decoding problems

Alex Chamberlain 1926 January 17, 2012 08:50AM

Re: URL Decoding problems

Maxim Dounin 731 January 17, 2012 10:52AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 298
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready