From dff914261195ade3fec25ec8c15eda9d9d2e7764 Mon Sep 17 00:00:00 2001 From: 0x2d3c Date: Tue, 21 Apr 2020 19:34:45 +0800 Subject: [PATCH] update:getFormCache function --- context.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/context.go b/context.go index a2384c0e..d554ac50 100644 --- a/context.go +++ b/context.go @@ -482,14 +482,12 @@ func (c *Context) PostFormArray(key string) []string { func (c *Context) getFormCache() { if c.formCache == nil { - c.formCache = make(url.Values) - req := c.Request - if err := req.ParseMultipartForm(c.engine.MaxMultipartMemory); err != nil { + if err := c.Request.ParseMultipartForm(c.engine.MaxMultipartMemory); err != nil { if err != http.ErrNotMultipart { debugPrint("error on parse multipart form array: %v", err) } } - c.formCache = req.PostForm + c.formCache = c.Request.PostForm } }