You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The range logic was being erroneously applied when there was no
Content-Length returned by the HEAD call.
Clone the http header when copying them to new requests, so that changes
are not inadvertently reflected in the caller.
The GetFile method still has the unfortunate behavior of not verifying
the destination file for the range request (which it currently can't,
because there is no metadata to compare). This means that a call to
replace an existing file when the server supports byte-range, will
either succeed if the new length is <= the previous, or corrupt the file
by appending new bytes. Silent corruption can be avoided by added a
`checksum` parameter to the go-getter request, but will still result in
failure to download.
Update the HttpGetter.GetFile method docs to reflect this behavior. In
most cases however the caller is not looking at the HttpGetter itself,
as go-getter is attempting to abstract this away. This means there needs
to be global support in the Client to make this a viable option. How to
add this can be decided separate from this fix.
0 commit comments