From b8b2fada5c90fad166b77ec9c2a535dbe76ab8a1 Mon Sep 17 00:00:00 2001 From: Panmax <967168@qq.com> Date: Tue, 10 Sep 2019 14:32:30 +0800 Subject: [PATCH] fix GetPostFormMap (#2051) --- context.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/context.go b/context.go index d9fcc285..86094cac 100644 --- a/context.go +++ b/context.go @@ -491,13 +491,8 @@ func (c *Context) PostFormMap(key string) map[string]string { // GetPostFormMap returns a map for a given form key, plus a boolean value // whether at least one value exists for the given key. func (c *Context) GetPostFormMap(key string) (map[string]string, bool) { - req := c.Request - if err := req.ParseMultipartForm(c.engine.MaxMultipartMemory); err != nil { - if err != http.ErrNotMultipart { - debugPrint("error on parse multipart form map: %v", err) - } - } - return c.get(req.PostForm, key) + c.getFormCache() + return c.get(c.formCache, key) } // get is an internal method and returns a map which satisfy conditions.