ignore EOF when parsing form as json
This commit is contained in:
parent
0f62fc25a0
commit
c7aa87c660
|
@ -141,6 +141,9 @@ func (i *Set) parseJSON(req *http.Request) error {
|
||||||
|
|
||||||
decoder := json.NewDecoder(req.Body)
|
decoder := json.NewDecoder(req.Body)
|
||||||
if err := decoder.Decode(&parsed); err != nil {
|
if err := decoder.Decode(&parsed); err != nil {
|
||||||
|
if err == io.EOF {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue