Mercurial > hg > nginx
comparison src/os/unix/ngx_freebsd_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 | 6d73e0dc4f64 |
children | fa77496b1df2 |
comparison
equal
deleted
inserted
replaced
5388:fbaae7d1c033 | 5389:72e31d88defa |
---|---|
14 #include <unistd.h> | 14 #include <unistd.h> |
15 #include <stdarg.h> | 15 #include <stdarg.h> |
16 #include <stddef.h> /* offsetof() */ | 16 #include <stddef.h> /* offsetof() */ |
17 #include <stdio.h> | 17 #include <stdio.h> |
18 #include <stdlib.h> | 18 #include <stdlib.h> |
19 #include <ctype.h> | |
19 #include <errno.h> | 20 #include <errno.h> |
20 #include <string.h> | 21 #include <string.h> |
21 #include <signal.h> | 22 #include <signal.h> |
22 #include <pwd.h> | 23 #include <pwd.h> |
23 #include <grp.h> | 24 #include <grp.h> |