aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-08-14 23:52:35 -0700
committerchrislu <chris.lu@gmail.com>2022-08-14 23:52:35 -0700
commit7457c746f0cc06ed19e97fa24207a252fcf76235 (patch)
tree8a399ba06246f32870cffcb1eac7a76ae5cbefa1
parent789d9dbfe1529d195514e871256af66ed12da9a2 (diff)
downloadseaweedfs-7457c746f0cc06ed19e97fa24207a252fcf76235.tar.xz
seaweedfs-7457c746f0cc06ed19e97fa24207a252fcf76235.zip
s3: fix aws s3api head-object
-rw-r--r--weed/s3api/s3api_object_handlers.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go
index 05908a30a..75abd0e4d 100644
--- a/weed/s3api/s3api_object_handlers.go
+++ b/weed/s3api/s3api_object_handlers.go
@@ -358,9 +358,11 @@ func (s3a *S3ApiServer) proxyToFiler(w http.ResponseWriter, r *http.Request, des
return
}
- if (resp.ContentLength == -1 || resp.StatusCode == 404) && resp.StatusCode != 304 {
- if r.Method != "DELETE" {
- s3err.WriteErrorResponse(w, r, s3err.ErrNoSuchKey)
+ if r.Method == "DELETE" {
+ if resp.StatusCode == http.StatusNotFound {
+ // this is normal
+ responseStatusCode := responseFn(resp, w)
+ s3err.PostLog(r, responseStatusCode, s3err.ErrNone)
return
}
}