aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_object_handlers.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2020-02-17 12:53:30 -0800
committerGitHub <noreply@github.com>2020-02-17 12:53:30 -0800
commit0a57db702614ec38ecd3032ee9ab8f50ab5d80e9 (patch)
treeb5aa5f41e6d4502f9843bff98cb140ee0f24a81d /weed/s3api/s3api_object_handlers.go
parent9232d3ac68a8d23a7f67ec66d8e227c362431507 (diff)
parent4cdde5f569419535b4ded8b0e54d18ead13a6458 (diff)
downloadseaweedfs-0a57db702614ec38ecd3032ee9ab8f50ab5d80e9.tar.xz
seaweedfs-0a57db702614ec38ecd3032ee9ab8f50ab5d80e9.zip
Merge pull request #1200 from chrislusf/add_s3_acl
Add s3 ACL
Diffstat (limited to 'weed/s3api/s3api_object_handlers.go')
-rw-r--r--weed/s3api/s3api_object_handlers.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go
index 1f1c181ec..662a313f9 100644
--- a/weed/s3api/s3api_object_handlers.go
+++ b/weed/s3api/s3api_object_handlers.go
@@ -42,8 +42,13 @@ func (s3a *S3ApiServer) PutObjectHandler(w http.ResponseWriter, r *http.Request)
rAuthType := getRequestAuthType(r)
dataReader := r.Body
+ var s3ErrCode ErrorCode
if rAuthType == authTypeStreamingSigned {
- dataReader = newSignV4ChunkedReader(r)
+ dataReader, s3ErrCode = s3a.iam.newSignV4ChunkedReader(r)
+ }
+ if s3ErrCode != ErrNone {
+ writeErrorResponse(w, s3ErrCode, r.URL)
+ return
}
defer dataReader.Close()