aboutsummaryrefslogtreecommitdiff
path: root/weed
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2020-07-25 10:08:23 -0700
committerGitHub <noreply@github.com>2020-07-25 10:08:23 -0700
commit54eebf538f0e4b335bea5137dbcd0f0e20d9eb68 (patch)
treefa4018cfdaf5824aa36ab7cc1c6c9141a552df23 /weed
parentfa0e2ff49876a199cda4c46d278ec6db750c083d (diff)
parenta09fcfcf2050af6f30b9999a767df6a732ca031c (diff)
downloadseaweedfs-54eebf538f0e4b335bea5137dbcd0f0e20d9eb68.tar.xz
seaweedfs-54eebf538f0e4b335bea5137dbcd0f0e20d9eb68.zip
Merge pull request #1402 from popstk/master
fix s3api bug
Diffstat (limited to 'weed')
-rw-r--r--weed/s3api/auth_credentials.go2
-rw-r--r--weed/s3api/s3api_object_copy_handlers.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.go
index 30052878b..de40897ea 100644
--- a/weed/s3api/auth_credentials.go
+++ b/weed/s3api/auth_credentials.go
@@ -110,7 +110,7 @@ func (iam *IdentityAccessManagement) lookupByAccessKey(accessKey string) (identi
func (iam *IdentityAccessManagement) Auth(f http.HandlerFunc, action Action) http.HandlerFunc {
- if iam.isEnabled() {
+ if !iam.isEnabled() {
return f
}
diff --git a/weed/s3api/s3api_object_copy_handlers.go b/weed/s3api/s3api_object_copy_handlers.go
index b8fb3f6a4..102f85139 100644
--- a/weed/s3api/s3api_object_copy_handlers.go
+++ b/weed/s3api/s3api_object_copy_handlers.go
@@ -61,7 +61,7 @@ func (s3a *S3ApiServer) CopyObjectHandler(w http.ResponseWriter, r *http.Request
response := CopyObjectResult{
ETag: etag,
- LastModified: time.Now(),
+ LastModified: time.Now().UTC(),
}
writeSuccessResponseXML(w, encodeResponse(response))
@@ -143,7 +143,7 @@ func (s3a *S3ApiServer) CopyObjectPartHandler(w http.ResponseWriter, r *http.Req
response := CopyPartResult{
ETag: etag,
- LastModified: time.Now(),
+ LastModified: time.Now().UTC(),
}
writeSuccessResponseXML(w, encodeResponse(response))