From cdbe4cceaca8b3dffd7e0bf31b0fe39599d5f898 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 20 Mar 2020 22:27:01 +0100 Subject: [PATCH] ignore io.EOF while parsing multipart --- internal/reqdata/set.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/reqdata/set.go b/internal/reqdata/set.go index b56a898..0c6ac67 100644 --- a/internal/reqdata/set.go +++ b/internal/reqdata/set.go @@ -3,6 +3,7 @@ package reqdata import ( "encoding/json" "fmt" + "io" "git.xdrm.io/go/aicra/internal/config" "git.xdrm.io/go/aicra/internal/multipart" @@ -219,6 +220,9 @@ func (i *Set) parseMultipart(req *http.Request) error { boundary := req.Header.Get("Content-Type")[len("multipart/form-data; boundary="):] mpr, err := multipart.NewReader(req.Body, boundary) if err != nil { + if err == io.EOF { + return nil + } return err }