Welcome! Log In Create A New Profile

Advanced

Re: Patch for nginx handling of X-Accel-Redirect URLs

Maxim Dounin
February 02, 2012 06:36AM
Hello!

On Thu, Feb 02, 2012 at 02:34:06AM +0400, vitalif@yourcmc.ru wrote:

> >The ngx_http_parse_complex_uri() function is part of a request
> >parsing code, optimized for the specific task of parsing URI of a
> >request in case it's complex and can't be parsed by
> >ngx_http_parse_request_line(). It's not a generic URI parsing
> >function and never was intended to be.
>
> So, do you mean that nginx is meant to not have such "generic URI
> parsing function" at all?

More or less generic one is ngx_http_parse_unsafe_uri().

> Okay - do you think it's sufficient just to change
> ngx_unescape_uri(&dst, &src, uri->len, 0);
> to
> ngx_unescape_uri(&dst, &src, uri->len, NGX_UNESCAPE_URI);
> in the previous patch? (i.e. in
> http://www.coderain.de/nginx/nginx-0.8.52-xred.patch)

No. The NGX_UNESCAPE_URI won't be sufficient, and it's in fact
does the wrong thing: it will stop unescaping on first unescaped
'?', thus preventing files with two question marks from working.

> P.S: what's NGX_UNESCAPE_REDIRECT?

It's the flag used by "rewrite ... redirect;". It's somewhat
broken and needs fixing, see tests and comments here:

http://mdounin.ru/hg/nginx-tests/file/tip/rewrite_unescape.t

Maxim Dounin

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

Patch for nginx handling of X-Accel-Redirect URLs

Anonymous User 2828 January 31, 2012 06:52PM

Re: Patch for nginx handling of X-Accel-Redirect URLs

Maxim Dounin 844 January 31, 2012 07:32PM

Re: Patch for nginx handling of X-Accel-Redirect URLs

Виталий Филиппов 878 February 01, 2012 06:04AM

Re: Patch for nginx handling of X-Accel-Redirect URLs

Maxim Dounin 961 February 01, 2012 09:40AM

Re: Patch for nginx handling of X-Accel-Redirect URLs

Anonymous User 805 February 01, 2012 05:36PM

Re: Patch for nginx handling of X-Accel-Redirect URLs

Maxim Dounin 860 February 02, 2012 06:36AM

Re: Patch for nginx handling of X-Accel-Redirect URLs

Anonymous User 776 February 02, 2012 07:00AM

Re: Patch for nginx handling of X-Accel-Redirect URLs

Maxim Dounin 977 February 02, 2012 11:44AM

Re: Patch for nginx handling of X-Accel-Redirect URLs

Anonymous User 832 February 01, 2012 06:28PM

Re: Patch for nginx handling of X-Accel-Redirect URLs

Maxim Dounin 1007 February 09, 2012 12:48PM



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

Online Users

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