From b6131783bf7f0ca8035b1461688af09c292b8e7f Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Tue, 2 Mar 2021 11:12:11 -0500 Subject: [PATCH] 16745: Handle GetBucketLocation API. Previously misinterpreted as ListObjects with no delimiter, which is very slow. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- services/keep-web/s3.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/keep-web/s3.go b/services/keep-web/s3.go index d500f1e65a..9479b58860 100644 --- a/services/keep-web/s3.go +++ b/services/keep-web/s3.go @@ -288,6 +288,11 @@ func (h *handler) serveS3(w http.ResponseWriter, r *http.Request) bool { w.Header().Set("Content-Type", "application/xml") io.WriteString(w, xml.Header) fmt.Fprintln(w, ``) + } else if _, ok = r.URL.Query()["location"]; ok { + // GetBucketLocation + w.Header().Set("Content-Type", "application/xml") + io.WriteString(w, xml.Header) + fmt.Fprintln(w, ``+h.Config.cluster.ClusterID+``) } else { // ListObjects h.s3list(bucketName, w, r, fs) -- 2.30.2