Klaus Demo nginx / 98e044c
merge r3459, r3571: Win32 fixes: *) compare long file names in case-insensitive mode, the bug had been introduced in r3436 *) test default NTFS stream "::$DATA" Igor Sysoev 9 years ago
4 changed file(s) with 25 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
783783
784784 p = r->uri.data + r->uri.len - 1;
785785
786 if (*p == '.' || *p == ' ') {
787
788 while (--p > r->uri.data && (*p == '.' || *p == ' ')) {
789 /* void */
786 while (p > r->uri.data) {
787
788 if (*p == ' ') {
789 p--;
790 continue;
790791 }
791792
793 if (*p == '.') {
794 p--;
795 continue;
796 }
797
798 if (ngx_strncasecmp(p - 6, (u_char *) "::$data", 7) == 0) {
799 p -= 7;
800 continue;
801 }
802
803 break;
804 }
805
806 if (p != r->uri.data + r->uri.len - 1) {
792807 r->uri.len = p + 1 - r->uri.data;
793
794808 ngx_http_set_exten(r);
795809 }
810
796811 }
797812 #endif
798813
4747 goto failed;
4848 }
4949
50 if (n != len - 1 || ngx_memcmp(u, lu, n) != 0) {
50 if (n != len - 1 || _wcsicmp(u, lu) != 0) {
5151 ngx_set_errno(NGX_ENOENT);
5252 goto failed;
5353 }
3535 #include <stdio.h>
3636 #include <stdlib.h>
3737 #include <stdarg.h>
38 #include <locale.h>
3839
3940 #ifdef __WATCOMC__
4041 #define _TIME_T_DEFINED
113113
114114 for (n = ngx_pagesize; n >>= 1; ngx_pagesize_shift++) { /* void */ }
115115
116 /* delete default "C" locale for _wcsicmp() */
117 setlocale(LC_ALL, "");
118
116119
117120 /* init Winsock */
118121