# HG changeset patch # User Igor Sysoev # Date 1264687768 0 # Node ID ee713c767b25bf8c7d0c6048e1b36f5197a7e347 # Parent 1b8c3599e3ce88d336ade10dfc636eb4d67c14b5 skip URI trailing spaces under Win32 diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -788,9 +788,11 @@ ngx_http_process_request_line(ngx_event_ p = r->uri.data + r->uri.len - 1; - if (*p == '.') { - - while (--p > r->uri.data && *p == '.') { /* void */ } + if (*p == '.' || *p == ' ') { + + while (--p > r->uri.data && (*p == '.' || *p == ' ')) { + /* void */ + } r->uri.len = p + 1 - r->uri.data;