mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
s3: fix aws s3api head-object
This commit is contained in:
parent
789d9dbfe1
commit
7457c746f0
|
@ -358,9 +358,11 @@ func (s3a *S3ApiServer) proxyToFiler(w http.ResponseWriter, r *http.Request, des
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resp.ContentLength == -1 || resp.StatusCode == 404) && resp.StatusCode != 304 {
|
if r.Method == "DELETE" {
|
||||||
if r.Method != "DELETE" {
|
if resp.StatusCode == http.StatusNotFound {
|
||||||
s3err.WriteErrorResponse(w, r, s3err.ErrNoSuchKey)
|
// this is normal
|
||||||
|
responseStatusCode := responseFn(resp, w)
|
||||||
|
s3err.PostLog(r, responseStatusCode, s3err.ErrNone)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue