compare long file names in case-insensitive mode,

the bug had been introduced in r3418
This commit is contained in:
Igor Sysoev 2010-03-03 10:05:54 +00:00
parent 416fc7aac7
commit f953436886
3 changed files with 5 additions and 1 deletions

View File

@ -48,7 +48,7 @@ ngx_open_file(u_char *name, u_long mode, u_long create, u_long access)
goto failed;
}
if (n != len - 1 || ngx_memcmp(u, lu, n) != 0) {
if (n != len - 1 || _wcsicmp(u, lu) != 0) {
ngx_set_errno(NGX_ENOENT);
goto failed;
}

View File

@ -36,6 +36,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <locale.h>
#ifdef __WATCOMC__
#define _TIME_T_DEFINED

View File

@ -114,6 +114,9 @@ ngx_os_init(ngx_log_t *log)
for (n = ngx_pagesize; n >>= 1; ngx_pagesize_shift++) { /* void */ }
/* delete default "C" locale for _wcsicmp() */
setlocale(LC_ALL, "");
/* init Winsock */