diff options
author | Josh Durgin <josh.durgin@inktank.com> | 2013-09-27 17:06:04 -0700 |
---|---|---|
committer | Josh Durgin <josh.durgin@inktank.com> | 2013-09-27 17:06:04 -0700 |
commit | cd566a4c0e076d373383c81e341056915a4b2a44 (patch) | |
tree | 8a61037e108fdacd32e0fa2f4f77a11418da447f | |
parent | a3aa00578b4c3f0c2f08bcda8931721a943cc4fe (diff) | |
parent | 1e9e34bc17564a9f7b3a84dfa9eb1aeab30dbae3 (diff) | |
download | ceph-cd566a4c0e076d373383c81e341056915a4b2a44.tar.gz |
Merge pull request #657 from ceph/wip-6397
Wip 6397
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
-rw-r--r-- | src/common/ceph_json.cc | 4 | ||||
-rw-r--r-- | src/rgw/rgw_rados.cc | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/src/common/ceph_json.cc b/src/common/ceph_json.cc index 84355575c6c..a48e0636fcf 100644 --- a/src/common/ceph_json.cc +++ b/src/common/ceph_json.cc @@ -222,9 +222,7 @@ bool JSONParser::parse(const char *buf_, int len) return false; } - string json_string = buf_; - // make a substring to len - json_string = json_string.substr(0, len); + string json_string(buf_, len); success = read(json_string, data); if (success) handle_value(data); diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 3db7c719a82..1b97f28e2fa 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -2635,7 +2635,6 @@ int RGWRados::copy_obj(void *ctx, { /* opening scope so that we can do goto, sorry */ bufferlist& extra_data_bl = processor.get_extra_data(); if (extra_data_bl.length()) { - extra_data_bl.append((char)0); JSONParser jp; if (!jp.parse(extra_data_bl.c_str(), extra_data_bl.length())) { ldout(cct, 0) << "failed to parse response extra data. len=" << extra_data_bl.length() << " data=" << extra_data_bl.c_str() << dendl; |