mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-24 15:00:43 +02:00
fix reading from a url
This commit is contained in:
1 parent
7b81cf3762
commit
c11d84f314
1 file changed
+4
-1
@@ -201,7 +201,10 @@ func ReadUrl(fileUrl string, offset int64, size int, buf []byte) (n int64, e err
|
||||
var i, m int
|
||||
|
||||
for {
|
||||
m, err = r.Body.Read(buf[i:cap(buf)])
|
||||
m, err = r.Body.Read(buf[i:])
|
||||
if m == 0 {
|
||||
return
|
||||
}
|
||||
i += m
|
||||
n += int64(m)
|
||||
if err == io.EOF {
|
||||
|
||||
Reference in new issue
Block a user