﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
270	'^~' 'location' 'prefix' fails with named captures & '^~*' usage also fails totally	j vp		"1.) one should expect that case sensitivity plays no role when using the ""stop searching"" notation (a '`^`') for 'location' regex's, but the '`^`~' prefix works and '`^`~*' does not.

2.) one can get the '`^`~' syntax verified at start-up with named captures as per this example:
	location	`^`~	`^`(?<epre>.+)?/error(?<efile>\/.+)$	{}
but as soon as you add usage of the named captures, the verification fails at that point (not at the regex itself). however, this does not happen 100% of the time! occasionally, if you have just one (1) named capture; the verification step completes w/o error.

this was discovered when the previous example was working with only the 'epre' capture and began to fail when the 'efile' was added. thereafter, removing the second capture would sometimes verify and sometimes not. seemingly, the problem is positional in its intermittency; since removing the first capture and leaving the second one never verified.

it seems the ""stop searching"" notation is not well-known/-documented and this may be why this problem is not widely reported.

distro: centos 6.3
perl: 5.16.2
"	defect	closed	critical		nginx-core	1.3.x	invalid	"location regex ""stop searching'' prefix"		Linux domain.tld 2.6.18-pony6-3 #1 SMP Tue Mar 13 07:31:44 PDT 2012 x86_64 x86_64 x86_64 GNU/Linux	"nginx version: nginx/1.3.9
built by gcc 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)
TLS SNI support enabled
configure arguments: --user=nginx --group=nginx --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --with-http_secure_link_module --with-http_random_index_module --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_degradation_module --with-http_stub_status_module --with-http_perl_module --with-http_geoip_module --with-mail --with-mail_ssl_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --with-ipv6 --with-file-aio --add-module=/builddir/build/BUILD/nginx-1.3.9/nginx-upstream-fair --add-module=/builddir/build/BUILD/nginx-1.3.9/nginx-upload-progress-module --add-module=/builddir/build/BUILD/nginx-1.3.9/mod_zip-1.1.6 --add-module=/builddir/build/BUILD/nginx-1.3.9/ngx_http_auth_pam_module-1.2 --add-module=/builddir/build/BUILD/nginx-1.3.9/nginx-upload-module-2.2 --add-module=/builddir/build/BUILD/nginx-1.3.9/nginx-rtmp-module-master
"
