httpreader: also resume on UnexpectedEOF
This commit is contained in:
parent
71f184f5cb
commit
a7d29c9564
@ -98,7 +98,7 @@ func (r *ResumableReader) Read(p []byte) (n int, err error) {
|
||||
n, err = r.reader.Read(p)
|
||||
r.position += int64(n)
|
||||
|
||||
if err == io.EOF {
|
||||
if err == io.EOF || err == io.ErrUnexpectedEOF {
|
||||
if r.position == r.contentLength {
|
||||
r.reader.Close()
|
||||
return n, err
|
||||
|
Loading…
Reference in New Issue
Block a user