proper marking of file as deleted

This commit is contained in:
Ben Sarmiento
2023-10-20 03:04:57 +02:00
parent 0e442fc9be
commit 59eb51b37b
9 changed files with 46 additions and 13 deletions

View File

@@ -110,7 +110,9 @@ func canFetchFirstByte(url string) bool {
_, err := resp.Body.Read(buffer)
return err == nil
}
if resp.StatusCode != http.StatusOK {
return false
}
// If server doesn't support partial content, try reading the first byte and immediately close
buffer := make([]byte, 1)
_, err = resp.Body.Read(buffer)