Skip to contentSkip to conversation

rgw: set xmlns on ListBucketResult element

PATCH New Henry C Chang 1 participant 1 message Sep 29, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rgw: set xmlns on ListBucketResult element

Certain S3 clients (e.g., s3fs) require the xmlns to parse the results correctly.

---
 src/rgw/rgw_rest_s3.cc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
src/rgw/rgw_rest_s3.cc +2 -1
index 38dcff1..666e831 100644
@@ -125,7 +125,8 @@ void RGWListBucket_REST_S3::send_response()
   if (ret < 0)
     return;
  
-  s->formatter->open_object_section("ListBucketResult");
+  s->formatter->open_object_section_in_ns("ListBucketResult",
+                  "http://s3.amazonaws.com/doc/2006-03-01/");
   s->formatter->dump_format("Name", s->bucket_name);
   if (!prefix.empty())
     s->formatter->dump_format("Prefix", prefix.c_str());
Signature · 1 line
1.7.4.1