Archived
1
0

Fix partial Download()'s that use Range headers.

This commit is contained in:
Simon Allen 2014-10-01 09:51:12 +10:00
parent a7ca85be35
commit 85aed1f9bd

View File

@ -545,7 +545,7 @@ func (db *Dropbox) Download(src, rev string, offset int) (io.ReadCloser, int64,
if response, err = db.client().Do(request); err != nil { if response, err = db.client().Do(request); err != nil {
return nil, 0, err return nil, 0, err
} }
if response.StatusCode == http.StatusOK { if response.StatusCode == http.StatusOK || response.StatusCode == http.StatusPartialContent {
return response.Body, response.ContentLength, err return response.Body, response.ContentLength, err
} }
response.Body.Close() response.Body.Close()