aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_object_handlers_put.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/s3api/s3api_object_handlers_put.go')
-rw-r--r--weed/s3api/s3api_object_handlers_put.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/s3api/s3api_object_handlers_put.go b/weed/s3api/s3api_object_handlers_put.go
index 17fceb8d2..cbd8da54f 100644
--- a/weed/s3api/s3api_object_handlers_put.go
+++ b/weed/s3api/s3api_object_handlers_put.go
@@ -20,6 +20,7 @@ import (
"github.com/seaweedfs/seaweedfs/weed/s3api/s3err"
"github.com/seaweedfs/seaweedfs/weed/security"
weed_server "github.com/seaweedfs/seaweedfs/weed/server"
+ "github.com/seaweedfs/seaweedfs/weed/util/constants"
stats_collect "github.com/seaweedfs/seaweedfs/weed/stats"
)
@@ -380,6 +381,8 @@ func setEtag(w http.ResponseWriter, etag string) {
func filerErrorToS3Error(errString string) s3err.ErrorCode {
switch {
+ case errString == constants.ErrMsgBadDigest:
+ return s3err.ErrBadDigest
case strings.HasPrefix(errString, "existing ") && strings.HasSuffix(errString, "is a directory"):
return s3err.ErrExistingObjectIsDirectory
case strings.HasSuffix(errString, "is a file"):