aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_object_handlers.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <lebedev_k@tochka.com>2021-05-24 16:59:44 +0500
committerKonstantin Lebedev <lebedev_k@tochka.com>2021-05-24 16:59:44 +0500
commitb612d5aebdb55767c2ac2afffedc96c2a27fd9db (patch)
tree61c41ad2627d51ef5544b9a80dfb223e87344567 /weed/s3api/s3api_object_handlers.go
parent9079ce0e7f9eebd10b33cbe27f030a6f4f584d04 (diff)
downloadseaweedfs-b612d5aebdb55767c2ac2afffedc96c2a27fd9db.tar.xz
seaweedfs-b612d5aebdb55767c2ac2afffedc96c2a27fd9db.zip
s3 test get w/ If-Match: bogus ETag
Diffstat (limited to 'weed/s3api/s3api_object_handlers.go')
-rw-r--r--weed/s3api/s3api_object_handlers.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go
index e6731e5be..e6140fd1a 100644
--- a/weed/s3api/s3api_object_handlers.go
+++ b/weed/s3api/s3api_object_handlers.go
@@ -333,6 +333,11 @@ func (s3a *S3ApiServer) proxyToFiler(w http.ResponseWriter, r *http.Request, des
}
defer util.CloseResponse(resp)
+ if resp.StatusCode == http.StatusPreconditionFailed {
+ writeErrorResponse(w, s3err.ErrPreconditionFailed, r.URL)
+ return
+ }
+
if (resp.ContentLength == -1 || resp.StatusCode == 404) && resp.StatusCode != 304 {
if r.Method != "DELETE" {
writeErrorResponse(w, s3err.ErrNoSuchKey, r.URL)