From c7aa87c660a91430160602f45832f57d46d532aa Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 20 Mar 2020 22:18:34 +0100 Subject: [PATCH] ignore EOF when parsing form as json --- internal/reqdata/set.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/reqdata/set.go b/internal/reqdata/set.go index 2417c48..f595c14 100644 --- a/internal/reqdata/set.go +++ b/internal/reqdata/set.go @@ -141,6 +141,9 @@ func (i *Set) parseJSON(req *http.Request) error { decoder := json.NewDecoder(req.Body) if err := decoder.Decode(&parsed); err != nil { + if err == io.EOF { + return nil + } return err }