diff --git a/vlib/vweb/vweb.v b/vlib/vweb/vweb.v index d3178b96a6..fb75dc6141 100644 --- a/vlib/vweb/vweb.v +++ b/vlib/vweb/vweb.v @@ -364,7 +364,7 @@ fn handle_conn(conn net.Socket, mut app T) { // since such methods have a priority. // For example URL `/register` matches route `/:user`, but `fn register()` // should be called first. - if (req.method == 'GET' && url_words[0] == method) || (req.method == 'POST' && url_words[0] + '_post' == method) { + if (req.method == 'GET' && url_words[0] == method && url_words.len == 1) || (req.method == 'POST' && url_words[0] + '_post' == method) { println('easy match method=$method') app.$method(vars) conn.close() or {}