]> granicus.if.org Git - pdns/commitdiff
Fix post to superMasterBackend
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 15 Jul 2014 10:46:08 +0000 (12:46 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 15 Jul 2014 10:46:08 +0000 (12:46 +0200)
We need to separate the individual rrs in the rrset.

modules/remotebackend/httpconnector.cc

index 7986938acc2c3c0c17796411159432c7325ea410..fe39619613060d6cdb8095d73311012da593d706 100644 (file)
@@ -145,9 +145,9 @@ void HTTPConnector::restful_requestbuilder(const std::string &method, const rapi
         size_t index = 0;
         for(rapidjson::Value::ConstValueIterator itr = parameters["nsset"].Begin(); itr != parameters["nsset"].End(); itr++) {
             index++;
-            ss2 << buildMemberListArgs("nsset[" + boost::lexical_cast<std::string>(index) + "]", itr);
+            ss2 << buildMemberListArgs("nsset[" + boost::lexical_cast<std::string>(index) + "]", itr) << "&";
         }
-        req.body = ss2.str();
+        req.body = ss2.str().substr(0, ss2.str().size()-1);
         req.headers["content-type"] = "application/x-www-form-urlencoded; charset=utf-8";
         req.headers["content-length"] = boost::lexical_cast<std::string>(req.body.size());
         verb = "POST";