1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vweb: fix a route matching bug

This commit is contained in:
Alexander Medvednikov 2020-07-03 22:00:17 +02:00
parent 67e85fa9dd
commit 244d61f8d0

View File

@ -324,7 +324,7 @@ fn handle_conn<T>(conn net.Socket, mut app T) {
//println('words:') println(route_words)
//println('vals:') println(url_words)
vars = []string{cap: route_words.len}
if route_words.len == url_words.len {
if route_words.len <= url_words.len {
// match `/:user/:repo/tree` to `/vlang/v/tree`
for i, word in route_words {
if word.starts_with(':') {