changeset 5148:4bcd35e7a0f0

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.
author Ruslan Ermilov <ru@nginx.com>
date Fri, 29 Mar 2013 08:47:37 +0000
parents 864030a4ff2a
children fc595eeb6c54
files src/http/ngx_http_core_module.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 
 #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);