diff options
| author | ruitao.liu <ruitao.liu@cloudminds.com> | 2020-11-12 11:50:19 +0800 |
|---|---|---|
| committer | ruitao.liu <ruitao.liu@cloudminds.com> | 2020-11-12 11:50:19 +0800 |
| commit | dbba8cb57ed6b2a29e2940e5de7618163fae3fbc (patch) | |
| tree | 060eb1fb43e1485b0cd7b22397f8877f654038a9 | |
| parent | 5b636b3242ab16043242e12a93b414931023fca2 (diff) | |
| download | seaweedfs-dbba8cb57ed6b2a29e2940e5de7618163fae3fbc.tar.xz seaweedfs-dbba8cb57ed6b2a29e2940e5de7618163fae3fbc.zip | |
fix if nil map in entry.
| -rw-r--r-- | weed/s3api/s3api_bucket_handlers.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/s3api/s3api_bucket_handlers.go b/weed/s3api/s3api_bucket_handlers.go index 643d15a04..b4f83a87f 100644 --- a/weed/s3api/s3api_bucket_handlers.go +++ b/weed/s3api/s3api_bucket_handlers.go @@ -96,6 +96,9 @@ func (s3a *S3ApiServer) PutBucketHandler(w http.ResponseWriter, r *http.Request) fn := func(entry *filer_pb.Entry) { if identityId := r.Header.Get(xhttp.AmzIdentityId); identityId != "" { + if entry.Extended == nil { + entry.Extended = make(map[string][]byte) + } entry.Extended[xhttp.AmzIdentityId] = []byte(identityId) } } |
