Added a call to discard http response where it was missed in previous fixes.

Also added a missing import "io/ioutil".
This commit is contained in:
Gilbert Chen
2020-09-09 21:47:01 -04:00
parent 4369bcfc0b
commit 403df1fd06

View File

@@ -21,6 +21,7 @@ import (
"strings"
"sync"
"time"
"io/ioutil"
)
type WebDAVStorage struct {
@@ -234,6 +235,7 @@ func (storage *WebDAVStorage) getProperties(uri string, depth int, properties ..
return nil, err
}
defer readCloser.Close()
defer io.Copy(ioutil.Discard, response.Body)
object := WebDAVMultiStatus{}
err = xml.NewDecoder(readCloser).Decode(&object)