]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_xml: xml_handle_data() appends data string
authorYehuda Sadeh <yehuda@inktank.com>
Wed, 1 Aug 2012 18:19:32 +0000 (11:19 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Wed, 8 Aug 2012 22:34:27 +0000 (15:34 -0700)
Fixes: #2879.
xml_handle_data() appends data to the object instead of just
replacing it. Parsed data can arrive in pieces, specifically
when data is escaped.

Backport: argonaut
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_xml.cc

index 2cd55dc8d042df4e4b898c54750222f012e06bf9..1d95abcb4b6d247e092438fe19597de41826d06f 100644 (file)
@@ -70,7 +70,7 @@ xml_end(const char *el)
 void XMLObj::
 xml_handle_data(const char *s, int len)
 {
-  data = string(s, len);
+  data.append(s, len);
 }
 
 string& XMLObj::