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

vweb: fix [post] route matching

This commit is contained in:
Alexander Medvednikov 2021-10-12 08:18:04 +03:00
parent 555e8cada6
commit cfc56b24fb

View File

@ -473,7 +473,7 @@ fn handle_conn<T>(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 {