Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>
// Path is "/{uuid}" or "/{uuid}/", has no object name
if _, ok := r.URL.Query()["versioning"]; ok {
// GetBucketVersioning
+ w.Header().Set("Content-Type", "application/xml")
fmt.Fprintln(w, `<VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"/>`)
} else {
// ListObjects
sort.Strings(resp.CommonPrefixes)
}
}
+ w.Header().Set("Content-Type", "application/xml")
if err := xml.NewEncoder(w).Encode(resp); err != nil {
ctxlog.FromContext(r.Context()).WithError(err).Error("error writing xml response")
}