summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/http/ngx_http_parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c
index ed5cf7506..aa56b976d 100644
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -1471,7 +1471,7 @@ ngx_http_parse_complex_uri(ngx_http_request_t *r, ngx_uint_t merge_slashes)
case '/':
case '?':
case '#':
- u -= 5;
+ u -= 4;
for ( ;; ) {
if (u < r->uri.data) {
return NGX_HTTP_PARSE_INVALID_REQUEST;
@@ -1575,7 +1575,7 @@ ngx_http_parse_complex_uri(ngx_http_request_t *r, ngx_uint_t merge_slashes)
u--;
} else if (state == sw_dot_dot) {
- u -= 5;
+ u -= 4;
for ( ;; ) {
if (u < r->uri.data) {