mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
use caseless regex locations on caseless filesystems: MacOSX, Win32, Cygwin
This commit is contained in:
parent
2376d6082a
commit
2642bf1a6d
@ -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.len = NGX_MAX_CONF_ERRSTR;
|
||||||
err.data = errstr;
|
err.data = errstr;
|
||||||
|
|
||||||
|
#if (NGX_HAVE_CASELESS_FILESYSTEM)
|
||||||
|
caseless = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
clcf->regex = ngx_regex_compile(regex, caseless ? NGX_REGEX_CASELESS: 0,
|
clcf->regex = ngx_regex_compile(regex, caseless ? NGX_REGEX_CASELESS: 0,
|
||||||
cf->pool, &err);
|
cf->pool, &err);
|
||||||
|
|
||||||
|
@ -149,6 +149,7 @@ ngx_int_t ngx_file_info(u_char *filename, ngx_file_info_t *fi);
|
|||||||
| (fi)->ftLastWriteTime.dwLowDateTime) \
|
| (fi)->ftLastWriteTime.dwLowDateTime) \
|
||||||
- 116444736000000000) / 10000000)
|
- 116444736000000000) / 10000000)
|
||||||
|
|
||||||
|
#define NGX_HAVE_CASELESS_FILESYSTEM 1
|
||||||
|
|
||||||
#define ngx_filename_cmp(s1, s2, n) _strnicmp((char *) s1, (char *) s2, n)
|
#define ngx_filename_cmp(s1, s2, n) _strnicmp((char *) s1, (char *) s2, n)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user