comparison src/os/win32/ngx_win32_config.h @ 5389:72e31d88defa

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 23 Sep 2013 19:37:13 +0400
parents 3d2d3e1cf427
children 5d4e4619982f 51d4fde64bca
comparison
equal deleted inserted replaced
5388:fbaae7d1c033 5389:72e31d88defa
43 #endif 43 #endif
44 44
45 #include <stdio.h> 45 #include <stdio.h>
46 #include <stdlib.h> 46 #include <stdlib.h>
47 #include <stdarg.h> 47 #include <stdarg.h>
48 #include <ctype.h>
48 #include <locale.h> 49 #include <locale.h>
49 50
50 #ifdef __WATCOMC__ 51 #ifdef __WATCOMC__
51 #define _TIME_T_DEFINED 52 #define _TIME_T_DEFINED
52 typedef long time_t; 53 typedef long time_t;
121 #elif defined __BORLANDC__ 122 #elif defined __BORLANDC__
122 typedef unsigned __int32 uint32_t; 123 typedef unsigned __int32 uint32_t;
123 typedef __int32 int32_t; 124 typedef __int32 int32_t;
124 typedef unsigned __int16 uint16_t; 125 typedef unsigned __int16 uint16_t;
125 #define ngx_libc_cdecl __cdecl 126 #define ngx_libc_cdecl __cdecl
126 #define _strnicmp strnicmp
127 127
128 #else /* __WATCOMC__ */ 128 #else /* __WATCOMC__ */
129 typedef unsigned int uint32_t; 129 typedef unsigned int uint32_t;
130 typedef int int32_t; 130 typedef int int32_t;
131 typedef unsigned short int uint16_t; 131 typedef unsigned short int uint16_t;
194 194
195 #ifndef NGX_HAVE_INHERITED_NONBLOCK 195 #ifndef NGX_HAVE_INHERITED_NONBLOCK
196 #define NGX_HAVE_INHERITED_NONBLOCK 1 196 #define NGX_HAVE_INHERITED_NONBLOCK 1
197 #endif 197 #endif
198 198
199 #ifndef NGX_HAVE_CASELESS_FILESYSTEM
200 #define NGX_HAVE_CASELESS_FILESYSTEM 1
201 #endif
202
199 #ifndef NGX_HAVE_WIN32_TRANSMITPACKETS 203 #ifndef NGX_HAVE_WIN32_TRANSMITPACKETS
200 #define NGX_HAVE_WIN32_TRANSMITPACKETS 1 204 #define NGX_HAVE_WIN32_TRANSMITPACKETS 1
201 #define NGX_HAVE_WIN32_TRANSMITFILE 0 205 #define NGX_HAVE_WIN32_TRANSMITFILE 0
202 #endif 206 #endif
203 207