]> git.kaiwu.me - nginx.git/commitdiff
skip URI trailing dots under Win32
authorIgor Sysoev <igor@sysoev.ru>
Tue, 14 Jul 2009 08:51:20 +0000 (08:51 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 14 Jul 2009 08:51:20 +0000 (08:51 +0000)
src/http/ngx_http_request.c

index d60384fe18cf7e54e3146484b88c6cea87fe0103..cc75939e64f839ba58f3503dedca029a433b54d7 100644 (file)
@@ -766,6 +766,22 @@ ngx_http_process_request_line(ngx_event_t *rev)
                 r->args.data = r->args_start;
             }
 
+#if (NGX_WIN32)
+            {
+            u_char  *p;
+
+            p = r->uri.data + r->uri.len - 1;
+
+            if (*p == '.') {
+
+                while (--p > r->uri.data && *p == '.') { /* void */ }
+
+                r->uri.len = p + 1 - r->uri.data;
+
+                ngx_http_set_exten(r);
+            }
+            }
+#endif
 
             ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
                            "http request line: \"%V\"", &r->request_line);