forked from TrueCloudLab/frostfs-s3-gw
[#158] Handled s3 errors on conditional headers
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
7b1058a9bd
commit
352d5345fc
4 changed files with 31 additions and 26 deletions
|
@ -73,9 +73,8 @@ func (h *handler) CopyObjectHandler(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
status := checkPreconditions(inf, args.Conditional)
|
||||
if status != http.StatusOK {
|
||||
w.WriteHeader(status)
|
||||
if err = checkPreconditions(inf, args.Conditional); err != nil {
|
||||
api.WriteErrorResponse(r.Context(), w, api.GetAPIError(api.ErrPreconditionFailed), r.URL)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue