fix s3 tests:

ranged_request_invalid_range
ranged_request_empty_object
This commit is contained in:
Konstantin Lebedev
2022-06-08 13:25:13 +05:00
parent 633a4aed18
commit 49f058da85
2 changed files with 11 additions and 0 deletions

View File

@@ -353,6 +353,11 @@ func (s3a *S3ApiServer) proxyToFiler(w http.ResponseWriter, r *http.Request, des
return
}
if resp.StatusCode == http.StatusRequestedRangeNotSatisfiable {
s3err.WriteErrorResponse(w, r, s3err.ErrInvalidRange)
return
}
if (resp.ContentLength == -1 || resp.StatusCode == 404) && resp.StatusCode != 304 {
if r.Method != "DELETE" {
s3err.WriteErrorResponse(w, r, s3err.ErrNoSuchKey)