mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Revert "volume: close request body if any parsing error"
This reverts commit 5996656141
.
This commit is contained in:
parent
af52fb2316
commit
359b7c1650
|
@ -3,7 +3,6 @@ package storage
|
|||
import (
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
||||
"github.com/chrislusf/seaweedfs/weed/operation"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"mime"
|
||||
"net/http"
|
||||
|
@ -14,12 +13,6 @@ import (
|
|||
|
||||
func parseMultipart(r *http.Request) (
|
||||
fileName string, data []byte, mimeType string, isGzipped bool, originalDataSize int, isChunkedFile bool, e error) {
|
||||
defer func() {
|
||||
if e != nil && r.Body != nil {
|
||||
io.Copy(ioutil.Discard, r.Body)
|
||||
r.Body.Close()
|
||||
}
|
||||
}()
|
||||
form, fe := r.MultipartReader()
|
||||
if fe != nil {
|
||||
glog.V(0).Infoln("MultipartReader [ERROR]", fe)
|
||||
|
|
Loading…
Reference in a new issue