mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 13:40:22 +03:00
api: Sent ErrPreconditionFailed on If-Match failure (#2009)
* api: Sent ErrPreconditionFailed on If-Match failure ref: http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList * tests: Added functional tests for GetObject w/ If-Match headers set * tests: Used verifyError to simplify errorCode and description matching on error
This commit is contained in:
committed by
Harshavardhana
parent
76f6533f8d
commit
a854e8cc5c
+1
-1
@@ -242,7 +242,7 @@ func checkETag(w http.ResponseWriter, r *http.Request) bool {
|
||||
delete(h, "Content-Type")
|
||||
delete(h, "Content-Length")
|
||||
delete(h, "Content-Range")
|
||||
w.WriteHeader(http.StatusPreconditionFailed)
|
||||
writeErrorResponse(w, r, ErrPreconditionFailed, r.URL.Path)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user