return xml encoded NotFound status code for s3 delete

This commit is contained in:
Rinat Shigapov
2020-06-11 17:53:15 +03:00
parent 2d2c5dfa39
commit fafc41a27f
3 changed files with 18 additions and 1 deletions

View File

@@ -112,6 +112,10 @@ func (s3a *S3ApiServer) DeleteObjectHandler(w http.ResponseWriter, r *http.Reque
for k, v := range proxyResponse.Header {
w.Header()[k] = v
}
if proxyResponse.StatusCode == http.StatusNotFound {
writeErrorResponse(w, ErrNoSuchKey, r.URL)
return
}
w.WriteHeader(proxyResponse.StatusCode)
})