vweb: fix array.last usage (#7905)
parent
e219f954d8
commit
42e60b8e27
|
@ -447,7 +447,7 @@ fn handle_conn<T>(mut conn net.TcpConn, mut app T) {
|
|||
req_method << route_words[0]
|
||||
}
|
||||
if url_words.len == route_words.len ||
|
||||
(url_words.len >= route_words.len - 1 && route_words.last().ends_with('...')) {
|
||||
(url_words.len >= route_words.len - 1 && route_words.len > 0 && route_words.last().ends_with('...')) {
|
||||
if req_method.len > 0 {
|
||||
if req_method_str.to_lower()[1..] !in req_method {
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue