From 77860d74a56774e25e9beae66878489027a4abe3 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 28 Jan 2010 14:09:28 +0000 Subject: [PATCH] skip URI trailing spaces under Win32 --- src/http/ngx_http_request.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 63eccf177..9ca19f556 100644 --- 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_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;