diff --git a/src/nxt_http_route.c b/src/nxt_http_route.c index 4a64d5c15..a3e207ffd 100644 --- a/src/nxt_http_route.c +++ b/src/nxt_http_route.c @@ -2134,6 +2134,10 @@ nxt_http_route_pattern(nxt_http_request_t *r, nxt_http_route_pattern_t *pattern, return 0; } + if (nxt_slow_path(length == 0)) { + return 1; + } + nxt_assert(pattern->u.pattern_slices != NULL); pattern_slices = pattern->u.pattern_slices;