From e11584164f787095e99e6759f2f6e16e24683855 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Mon, 23 Sep 2013 19:37:13 +0400 Subject: Added ngx_filename_cmp() with "/" sorted to the left. This patch fixes incorrect handling of auto redirect in configurations like: location /0 { } location /a- { } location /a/ { proxy_pass ... } With previously used sorting, this resulted in the following locations tree (as "-" is less than "/"): "/a-" "/0" "/a/" and a request to "/a" didn't match "/a/" with auto_redirect, as it didn't traverse relevant tree node during lookup (it tested "/a-", then "/0", and then falled back to null location). To preserve locale use for non-ASCII characters on case-insensetive systems, libc's tolower() used. --- src/os/win32/ngx_files.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/os/win32/ngx_files.h') diff --git a/src/os/win32/ngx_files.h b/src/os/win32/ngx_files.h index a4624738f..08e5dc67e 100644 --- a/src/os/win32/ngx_files.h +++ b/src/os/win32/ngx_files.h @@ -172,11 +172,6 @@ ngx_int_t ngx_create_file_mapping(ngx_file_mapping_t *fm); void ngx_close_file_mapping(ngx_file_mapping_t *fm); -#define NGX_HAVE_CASELESS_FILESYSTEM 1 - -#define ngx_filename_cmp(s1, s2, n) _strnicmp((char *) s1, (char *) s2, n) - - u_char *ngx_realpath(u_char *path, u_char *resolved); #define ngx_realpath_n "" #define ngx_getcwd(buf, size) GetCurrentDirectory(size, (char *) buf) -- cgit v1.2.3