Fixed URI normalization with merge_slashes switched off.
Previously, "/foo///../bar" was normalized into "/foo/bar"
instead of "/foo//bar".
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c
index ed5cf75..aa56b97 100644
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -1471,7 +1471,7 @@
case '/':
case '?':
case '#':
- u -= 5;
+ u -= 4;
for ( ;; ) {
if (u < r->uri.data) {
return NGX_HTTP_PARSE_INVALID_REQUEST;
@@ -1575,7 +1575,7 @@
u--;
} else if (state == sw_dot_dot) {
- u -= 5;
+ u -= 4;
for ( ;; ) {
if (u < r->uri.data) {