comparison src/os/unix/ngx_solaris_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 b13419459a50
children 7142b04337d6
comparison
equal deleted inserted replaced
5388:fbaae7d1c033 5389:72e31d88defa
20 #include <unistd.h> 20 #include <unistd.h>
21 #include <stdarg.h> 21 #include <stdarg.h>
22 #include <stddef.h> /* offsetof() */ 22 #include <stddef.h> /* offsetof() */
23 #include <stdio.h> 23 #include <stdio.h>
24 #include <stdlib.h> 24 #include <stdlib.h>
25 #include <ctype.h>
25 #include <errno.h> 26 #include <errno.h>
26 #include <string.h> 27 #include <string.h>
27 #include <signal.h> 28 #include <signal.h>
28 #include <pwd.h> 29 #include <pwd.h>
29 #include <grp.h> 30 #include <grp.h>