[ARVADOS] updated: 1.3.0-2785-g682bdcc34
Git user
git at public.arvados.org
Thu Jul 30 20:23:38 UTC 2020
Summary of changes:
services/keep-web/s3.go | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
via 682bdcc34462afc37089d7769cf11fda6c04a45c (commit)
from 19a9f4a4cfc7c7937f2140f7504521bb76fdf843 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 682bdcc34462afc37089d7769cf11fda6c04a45c
Author: Tom Clegg <tom at tomclegg.ca>
Date: Thu Jul 30 16:23:13 2020 -0400
16535: Fix XML tags on ListBucket response, add XML headers.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at tomclegg.ca>
diff --git a/services/keep-web/s3.go b/services/keep-web/s3.go
index bc43c5243..7a25e9277 100644
--- a/services/keep-web/s3.go
+++ b/services/keep-web/s3.go
@@ -71,6 +71,7 @@ func (h *handler) serveS3(w http.ResponseWriter, r *http.Request) bool {
if _, ok := r.URL.Query()["versioning"]; ok {
// GetBucketVersioning
w.Header().Set("Content-Type", "application/xml")
+ io.WriteString(w, xml.Header)
fmt.Fprintln(w, `<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"/>`)
} else {
// ListObjects
@@ -306,8 +307,13 @@ func (h *handler) s3list(w http.ResponseWriter, r *http.Request, fs arvados.Cust
sort.Strings(resp.CommonPrefixes)
}
}
+ wrappedResp := struct {
+ XMLName string `xml:"http://s3.amazonaws.com/doc/2006-03-01/ ListBucketResult"`
+ s3.ListResp
+ }{"", resp}
w.Header().Set("Content-Type", "application/xml")
- if err := xml.NewEncoder(w).Encode(resp); err != nil {
+ io.WriteString(w, xml.Header)
+ if err := xml.NewEncoder(w).Encode(wrappedResp); err != nil {
ctxlog.FromContext(r.Context()).WithError(err).Error("error writing xml response")
}
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list