Skip to content

Commit

Permalink
Do not consider a zero-sized object a failure
Browse files Browse the repository at this point in the history
This code previously considered a zero-sized object a stat failure
as the webdav API doesn't distinguish between "server didn't send
the information" and "zero sized object".

Between the two, let's assume a competent server and not consider
the zero-sized object a failure.
  • Loading branch information
bbockelm committed Sep 8, 2024
1 parent 035e389 commit 40cf996
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions client/handle_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -2748,15 +2748,6 @@ func statHttp(dest *url.URL, dirResp server_structs.DirectorResponse, token stri
return
}

if info.Size == 0 {
if info.IsCollection {
resultsChan <- statResults{info, nil}
}
err = errors.New("Stat response did not include a size")
resultsChan <- statResults{FileInfo{}, err}
return
}

resultsChan <- statResults{FileInfo{
Name: endpoint.Path,
Size: info.Size,
Expand Down

0 comments on commit 40cf996

Please sign in to comment.