]> git.kaiwu.me - nginx.git/commitdiff
skip URI trailing spaces under Win32
authorIgor Sysoev <igor@sysoev.ru>
Thu, 28 Jan 2010 14:09:28 +0000 (14:09 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 28 Jan 2010 14:09:28 +0000 (14:09 +0000)
src/http/ngx_http_request.c

index 63eccf1773eebb40e2cef9b0ac098a232517416a..9ca19f556f59b81873ab04b80ca5c7835fd8abd1 100644 (file)
@@ -788,9 +788,11 @@ ngx_http_process_request_line(ngx_event_t *rev)
 
             p = r->uri.data + r->uri.len - 1;
 
-            if (*p == '.') {
+            if (*p == '.' || *p == ' ') {
 
-                while (--p > r->uri.data && *p == '.') { /* void */ }
+                while (--p > r->uri.data && (*p == '.' || *p == ' ')) {
+                    /* void */
+                }
 
                 r->uri.len = p + 1 - r->uri.data;