diff options
Diffstat (limited to 'src/http/ngx_http_parse.c')
-rw-r--r-- | src/http/ngx_http_parse.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c index a7784a36d..e02805be8 100644 --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c @@ -175,7 +175,7 @@ int ngx_parse_http_request_line(ngx_http_request_t *r) } break; - /* check "/." or "//" */ + /* check "/.", "//", and "%" in URI */ case sw_after_slash_in_uri: switch (ch) { case CR: @@ -193,6 +193,7 @@ int ngx_parse_http_request_line(ngx_http_request_t *r) state = sw_http_09; break; case '.': + case '%': r->complex_uri = 1; state = sw_uri; break; @@ -211,7 +212,7 @@ int ngx_parse_http_request_line(ngx_http_request_t *r) } break; - /* check slash in URI */ + /* check "/" and "%" in URI */ case sw_check_uri: switch (ch) { case CR: @@ -235,6 +236,10 @@ int ngx_parse_http_request_line(ngx_http_request_t *r) r->uri_ext = NULL; state = sw_after_slash_in_uri; break; + case '%': + r->complex_uri = 1; + state = sw_uri; + break; case '?': r->args_start = p; state = sw_uri; |