aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSmoothDenis <syropyatov.denis@yandex.ru>2023-07-22 18:22:38 +0400
committerGitHub <noreply@github.com>2023-07-22 07:22:38 -0700
commit51bcc219ea55b86077a6a921284530fb2de9d707 (patch)
treea9c7a3ef88d054ab45d4835a5f100819bf18fbb5
parent7ab8c6976effc5ddd876b6b4fde58ecf0015e9c5 (diff)
downloadseaweedfs-51bcc219ea55b86077a6a921284530fb2de9d707.tar.xz
seaweedfs-51bcc219ea55b86077a6a921284530fb2de9d707.zip
s3api should return 500 code from filer (#4699)
-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 33de2a13e..e959ff1f1 100644
--- a/weed/s3api/s3api_object_handlers.go
+++ b/weed/s3api/s3api_object_handlers.go
@@ -416,6 +416,11 @@ func (s3a *S3ApiServer) proxyToFiler(w http.ResponseWriter, r *http.Request, des
return
}
+ if resp.StatusCode == http.StatusInternalServerError {
+ s3err.WriteErrorResponse(w, r, s3err.ErrInternalError)
+ return
+ }
+
// when HEAD a directory, it should be reported as no such key
// https://github.com/seaweedfs/seaweedfs/issues/3457
if resp.ContentLength == -1 && resp.StatusCode != http.StatusNotModified {