ignore io.EOF while parsing multipart
This commit is contained in:
parent
03d5e87c37
commit
cdbe4cceac
|
@ -3,6 +3,7 @@ package reqdata
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io"
|
||||||
|
|
||||||
"git.xdrm.io/go/aicra/internal/config"
|
"git.xdrm.io/go/aicra/internal/config"
|
||||||
"git.xdrm.io/go/aicra/internal/multipart"
|
"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="):]
|
boundary := req.Header.Get("Content-Type")[len("multipart/form-data; boundary="):]
|
||||||
mpr, err := multipart.NewReader(req.Body, boundary)
|
mpr, err := multipart.NewReader(req.Body, boundary)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if err == io.EOF {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue