summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_rest_swift.cc
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@hq.newdream.net>2011-11-14 22:55:09 +0100
committerYehuda Sadeh <yehuda@hq.newdream.net>2011-11-14 22:55:29 +0100
commit1fe16923b4eef058fdd898ffb028f06cb702b42a (patch)
treeff45ecd4c405bc80b7b3a40d03047bcc6e398be3 /src/rgw/rgw_rest_swift.cc
parentrgw: Fix some merge problems uncovered by gcc warnings: (diff)
downloadceph-1fe16923b4eef058fdd898ffb028f06cb702b42a.tar.xz
ceph-1fe16923b4eef058fdd898ffb028f06cb702b42a.zip
rgw: fix swift responses encoding
Diffstat (limited to 'src/rgw/rgw_rest_swift.cc')
-rw-r--r--src/rgw/rgw_rest_swift.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc
index 673498c58ee..00db6e8af22 100644
--- a/src/rgw/rgw_rest_swift.cc
+++ b/src/rgw/rgw_rest_swift.cc
@@ -42,7 +42,7 @@ void RGWListBuckets_REST_SWIFT::send_response()
for (int i = 0; i < limit && iter != m.end(); ++iter, ++i) {
RGWBucketEnt obj = iter->second;
s->formatter->open_object_section("container");
- s->formatter->dump_format("name", obj.bucket.name.c_str());
+ s->formatter->dump_string("name", obj.bucket.name.c_str());
s->formatter->dump_int("count", obj.count);
s->formatter->dump_int("bytes", obj.size);
s->formatter->close_section();
@@ -130,8 +130,8 @@ void RGWListBucket_REST_SWIFT::send_response()
goto next;
s->formatter->open_object_section("object");
- s->formatter->dump_format("name", iter->name.c_str());
- s->formatter->dump_format("hash", "\"%s\"", iter->etag.c_str());
+ s->formatter->dump_string("name", iter->name.c_str());
+ s->formatter->dump_string("hash", iter->etag.c_str());
s->formatter->dump_int("bytes", iter->size);
string single_content_type = iter->content_type;
if (iter->content_type.size()) {
@@ -143,7 +143,7 @@ void RGWListBucket_REST_SWIFT::send_response()
++pos;
single_content_type = single_content_type.substr(pos);
}
- s->formatter->dump_format("content_type", single_content_type.c_str());
+ s->formatter->dump_string("content_type", single_content_type.c_str());
}
dump_time(s, "last_modified", &iter->mtime);
s->formatter->close_section();
@@ -155,7 +155,7 @@ void RGWListBucket_REST_SWIFT::send_response()
goto next;
s->formatter->open_object_section("object");
- s->formatter->dump_format("name", pref_iter->first.c_str());
+ s->formatter->dump_string("name", pref_iter->first.c_str());
s->formatter->close_section();
}
next: