summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2013-03-29 08:47:37 +0000
committerRuslan Ermilov <ru@nginx.com>2013-03-29 08:47:37 +0000
commit600f9d3ea857297cf19d4055d72335c2a24594f7 (patch)
treee512e3ba278d49f6cdfe0b257c7918ba597bc967 /src
parentf24f5f116fb58339cd418aa460cdee80b3a36768 (diff)
downloadnginx-600f9d3ea857297cf19d4055d72335c2a24594f7.tar.gz
nginx-600f9d3ea857297cf19d4055d72335c2a24594f7.tar.bz2
Pass PCRE_CASELESS to pcre_compile() for caseless matching.
Previously, we sometimes passed constant value 1 that happens to match PCRE_CASELESS and thus was harmless.
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_core_module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 80cf2d6b9..25d3dc97d 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -3256,7 +3256,7 @@ ngx_http_core_regex_location(ngx_conf_t *cf, ngx_http_core_loc_conf_t *clcf,
#if (NGX_HAVE_CASELESS_FILESYSTEM)
rc.options = NGX_REGEX_CASELESS;
#else
- rc.options = caseless;
+ rc.options = caseless ? NGX_REGEX_CASELESS : 0;
#endif
clcf->regex = ngx_http_regex_compile(cf, &rc);