diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-07-14 08:53:37 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-07-14 08:53:37 +0000 |
commit | 2642bf1a6df887b4ab05496fbf0f6028036fb750 (patch) | |
tree | 394e6e0143540f630862066a60a2e66f2b53333a /src | |
parent | 2376d6082ab407a68619bfeb753c825e30617e2d (diff) | |
download | nginx-2642bf1a6df887b4ab05496fbf0f6028036fb750.tar.gz nginx-2642bf1a6df887b4ab05496fbf0f6028036fb750.zip |
use caseless regex locations on caseless filesystems: MacOSX, Win32, Cygwin
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_core_module.c | 4 | ||||
-rw-r--r-- | src/os/win32/ngx_files.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 9d614d450..e79dd1cd2 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -2566,6 +2566,10 @@ ngx_http_core_regex_location(ngx_conf_t *cf, ngx_http_core_loc_conf_t *clcf, err.len = NGX_MAX_CONF_ERRSTR; err.data = errstr; +#if (NGX_HAVE_CASELESS_FILESYSTEM) + caseless = 1; +#endif + clcf->regex = ngx_regex_compile(regex, caseless ? NGX_REGEX_CASELESS: 0, cf->pool, &err); diff --git a/src/os/win32/ngx_files.h b/src/os/win32/ngx_files.h index af56800d5..950bd98a2 100644 --- a/src/os/win32/ngx_files.h +++ b/src/os/win32/ngx_files.h @@ -149,6 +149,7 @@ ngx_int_t ngx_file_info(u_char *filename, ngx_file_info_t *fi); | (fi)->ftLastWriteTime.dwLowDateTime) \ - 116444736000000000) / 10000000) +#define NGX_HAVE_CASELESS_FILESYSTEM 1 #define ngx_filename_cmp(s1, s2, n) _strnicmp((char *) s1, (char *) s2, n) |