]> git.kaiwu.me - nginx.git/commitdiff
test default NTFS stream "::$DATA"
authorIgor Sysoev <igor@sysoev.ru>
Fri, 4 Jun 2010 15:37:49 +0000 (15:37 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 4 Jun 2010 15:37:49 +0000 (15:37 +0000)
src/http/ngx_http_request.c

index 3432b50a0263c248ec1672f961e98198ecccbfff..dbc92cf52c251999cd9e1fa83ed882d43bc02658 100644 (file)
@@ -788,16 +788,31 @@ ngx_http_process_request_line(ngx_event_t *rev)
 
             p = r->uri.data + r->uri.len - 1;
 
-            if (*p == '.' || *p == ' ') {
+            while (p > r->uri.data) {
 
-                while (--p > r->uri.data && (*p == '.' || *p == ' ')) {
-                    /* void */
+                if (*p == ' ') {
+                    p--;
+                    continue;
                 }
 
-                r->uri.len = p + 1 - r->uri.data;
+                if (*p == '.') {
+                    p--;
+                    continue;
+                }
 
+                if (ngx_strncasecmp(p - 6, (u_char *) "::$data", 7) == 0) {
+                    p -= 7;
+                    continue;
+                }
+
+                break;
+            }
+
+            if (p != r->uri.data + r->uri.len - 1) {
+                r->uri.len = p + 1 - r->uri.data;
                 ngx_http_set_exten(r);
             }
+
             }
 #endif