<html><head></head><body>But this will basically duplicate ngx_http_parse_complex_uri's functionality in parse_unsafe_uri (at least part of it). Maybe just try to make it less "specific"? Why not have a single function for URI parsing?<br>
-- <br>
Отправлено с мобильного телефона через К-9 Mail. Извините за краткость, пожалуйста.<br><br><div class="gmail_quote">Maxim Dounin <mdounin@mdounin.ru> написал(а):<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre style="white-space: pre-wrap; word-wrap:break-word; font-family: sans-serif">Hello!<br /><br />On Wed, Feb 01, 2012 at 03:51:18AM +0400, vitalif@yourcmc.ru wrote:<br /><br />> Hello!<br />> <br />> By now, nginx does not allow urlencoded X-Accel-Redirect URLs and<br />> totally fails to access files with '?' in name with it.<br />> The problem was also discussed at 'nginx' maillist:<br />> <a href="http://nginx.2469901.n2.nabble.com/Bug-X-Accel-Redirect-td5510716.html">http://nginx.2469901.n2.nabble.com/Bug-X-Accel-Redirect-td5510716.html</a><br />> <br />> The patch suggested there just unescaped the url in<br />> ngx_http_parse_unsafe_uri(). As Maxim Dounin said, this is incorrect<br />> because also unescapes the query string.<br />> I want to suggest another solution - swap<br />> ngx_http_parse_unsafe_uri() to ngx_http_parse_complex_uri(). The<br />> patch is in attachment.<br />> What can you say about it?<br /><br />> T
his is
a patch for nginx 1.1.12 handling of X-Accel-Redirect URLs:<br />> run them through ngx_http_parse_complex_uri(), not ngx_http_parse_unsafe_uri().<br />> It allows to handle percent-encoded URLs and complex filenames in X-Accel-Redirect<br />> (for example, filenames which contain '?').<br /><br />I don't think that swap with ngx_http_parse_complex_uri() is a <br />good idea. It's very specialized function to parse original <br />request uri, and in particular it modifies many private request <br />fields which shouldn't be modified by proxy.<br /><br />I would rather like to see ngx_http_parse_unsafe_uri() changes <br />done right (i.e. unescape only uri, but not query string, and <br />preserve checks currently done).<br /><br />Note that among standard modules the change of <br />ngx_http_parse_unsafe_uri() will also affect dav and ssi modules. <br />I think that in both cases effect will be similar to one with <br />X-Accel-Redirect, i.e. positive (though I hav
en't
checked too <br />deep).<br /><br />Maxim Dounin<br /><br /><hr /><br />nginx-devel mailing list<br />nginx-devel@nginx.org<br /><a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a><br /></pre></blockquote></div></body></html>