diff --git a/CHANGELOG.md b/CHANGELOG.md index af1d92bb..422c17e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ This document outlines major changes between releases. - Don't count pool error on client abort (#35) ### Added +- Return `X-Owner-Id` in `head-bucket` response (#79) - Return container name in `head-bucket` response (TrueCloudLab#18) - Billing metrics (TrueCloudLab#5) - Multiple configs support (TrueCloudLab#21) diff --git a/api/handler/head.go b/api/handler/head.go index 8c7ef697..0ac519e4 100644 --- a/api/handler/head.go +++ b/api/handler/head.go @@ -122,6 +122,7 @@ func (h *handler) HeadBucketHandler(w http.ResponseWriter, r *http.Request) { return } + w.Header().Set(api.OwnerID, bktInfo.Owner.EncodeToString()) w.Header().Set(api.ContainerID, bktInfo.CID.EncodeToString()) w.Header().Set(api.AmzBucketRegion, bktInfo.LocationConstraint) diff --git a/api/headers.go b/api/headers.go index db9fc2a9..42280ad6 100644 --- a/api/headers.go +++ b/api/headers.go @@ -62,6 +62,7 @@ const ( AmzServerSideEncryptionCustomerKey = "x-amz-server-side-encryption-customer-key" AmzServerSideEncryptionCustomerKeyMD5 = "x-amz-server-side-encryption-customer-key-MD5" + OwnerID = "X-Owner-Id" ContainerID = "X-Container-Id" ContainerName = "X-Container-Name" ContainerZone = "X-Container-Zone"