﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
1090	try_files with map variable works differently in 1.10.x and 1.11.x	Pyry Hakulinen		"Following config:

{{{
map $uri $wordpress_uri {
    default $uri;
#   Real config contains other stuff, which doesn't match, and doesn't matter (like this):
    ~^(/[_0-9a-zA-Z-]+)?(?<wp_file_uri>/wp-.+)$     $wp_file_uri;

}
server {
    listen 80;

    index index.php index.html;

    root /tmp/nginx;

    location / {
        try_files
            $wordpress_uri
            $wordpress_uri/
            @fallback;
    }
    location @fallback {
        return 200 ""ok"";
    }
}
}}}

/tmp/nginx/index.html
{{{
Somefile
}}}

On 1.11.x this will result in internal redirect loop:
{{{
2016/09/30 07:36:46 [error] 27355#0: *9 rewrite or internal redirection cycle while internally redirecting to ""/index.html"", client: 10.10.10.10, server: _, request: ""GET / HTTP/1.1"", host: ""somehost.example.com""
}}}
On 1.10.x it will work fine and the contents of /tmp/nginx/index.html is returned to the client. Also if I change try_files to try_files $uri $uri/ @fallback; it will work fine in both versions.

Attached are debug logs for both 1.10.1 and 1.11.4.

Is this intentional change of behavior or a bug? Also if it's intentional, it would be helpful if changes like this were mentioned in the Changelog. Thanks and happy to provide more information if needed."	defect	closed	minor		nginx-core	1.11.x	fixed			"Linux foo.example 3.16.0-0.bpo.4-amd64 #1 SMP Debian 3.16.7-ckt2-1~bpo70+1 (2014-12-08) x86_64 GNU/Linux
"	"nginx version: nginx/1.11.4
built with OpenSSL 1.0.2i  22 Sep 2016
TLS SNI support enabled
configure arguments: --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --conf-path=/usr/local/etc/nginx.conf --error-log-path=/var/log/nginx/error_log --http-log-path=/var/log/nginx/access_log --sbin-path=/usr/local/sbin/nginx --with-openssl=../openssl-1.0.2i/ --with-http_auth_request_module --with-debug --add-module=../nginx_auth_mysql-r132-1.11.x/ --add-module=../ngx_devel_kit-0.2.19/ --add-module=../lua-nginx-module-0.10.6/
"
