comparison src/http/ngx_http_request.c @ 3584:771d28b86077 stable-0.7

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"
author Igor Sysoev <igor@sysoev.ru>
date Mon, 07 Jun 2010 10:14:11 +0000
parents 5d9ff79eab6f
children 9ccda889a355
comparison
equal deleted inserted replaced
3583:d513f9d30208 3584:771d28b86077
782 { 782 {
783 u_char *p; 783 u_char *p;
784 784
785 p = r->uri.data + r->uri.len - 1; 785 p = r->uri.data + r->uri.len - 1;
786 786
787 if (*p == '.' || *p == ' ') { 787 while (p > r->uri.data) {
788 788
789 while (--p > r->uri.data && (*p == '.' || *p == ' ')) { 789 if (*p == ' ') {
790 /* void */ 790 p--;
791 continue;
791 } 792 }
792 793
794 if (*p == '.') {
795 p--;
796 continue;
797 }
798
799 if (ngx_strncasecmp(p - 6, (u_char *) "::$data", 7) == 0) {
800 p -= 7;
801 continue;
802 }
803
804 break;
805 }
806
807 if (p != r->uri.data + r->uri.len - 1) {
793 r->uri.len = p + 1 - r->uri.data; 808 r->uri.len = p + 1 - r->uri.data;
794
795 ngx_http_set_exten(r); 809 ngx_http_set_exten(r);
796 } 810 }
811
797 } 812 }
798 #endif 813 #endif
799 814
800 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, 815 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
801 "http request line: \"%V\"", &r->request_line); 816 "http request line: \"%V\"", &r->request_line);