From: Tom Clegg Date: Tue, 2 Mar 2021 16:12:11 +0000 (-0500) Subject: 16745: Handle GetBucketLocation API. X-Git-Tag: 2.2.0~114^2~3 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/b6131783bf7f0ca8035b1461688af09c292b8e7f 16745: Handle GetBucketLocation API. Previously misinterpreted as ListObjects with no delimiter, which is very slow. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- 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)