From cfc56b24fb45216f03ceaf0ab5575285b61199e3 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Tue, 12 Oct 2021 08:18:04 +0300 Subject: [PATCH] vweb: fix [post] route matching --- vlib/vweb/vweb.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/vweb/vweb.v b/vlib/vweb/vweb.v index 53ec772b2c..8b9bb15be4 100644 --- a/vlib/vweb/vweb.v +++ b/vlib/vweb/vweb.v @@ -473,7 +473,7 @@ fn handle_conn(mut conn net.TcpConn, mut app T, routes map[string]Route) { // should be called first. if !route.path.contains('/:') && url_words == route_words { // We found a match - if req.method == .post { + if req.method == .post && method.args.len > 0 { // Populate method args with form values mut args := []string{cap: method.args.len} for param in method.args {