From: Ruben Kerkhof Date: Tue, 15 Jul 2014 10:46:08 +0000 (+0200) Subject: Fix post to superMasterBackend X-Git-Tag: auth-3.4.0-rc1~83^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50378d868a56f8c77a644aa12624605102fde616;p=pdns Fix post to superMasterBackend We need to separate the individual rrs in the rrset. --- diff --git a/modules/remotebackend/httpconnector.cc b/modules/remotebackend/httpconnector.cc index 7986938ac..fe3961961 100644 --- a/modules/remotebackend/httpconnector.cc +++ b/modules/remotebackend/httpconnector.cc @@ -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(index) + "]", itr); + ss2 << buildMemberListArgs("nsset[" + boost::lexical_cast(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(req.body.size()); verb = "POST";