Mercurial > hg > nginx
changeset 7579:6208c5418c88
Fixed URI normalization with merge_slashes switched off.
Previously, "/foo///../bar" was normalized into "/foo/bar"
instead of "/foo//bar".
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 08 Oct 2019 21:56:14 +0300 |
parents | 79bcbe7cd3f2 |
children | 8f55cb5c7e79 |
files | src/http/ngx_http_parse.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_parse.c Tue Oct 08 21:56:14 2019 +0300 +++ b/src/http/ngx_http_parse.c Tue Oct 08 21:56:14 2019 +0300 @@ -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) {