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:
parent
67e85fa9dd
commit
244d61f8d0
@ -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(':') {
|
||||
|
Loading…
Reference in New Issue
Block a user