Skip to content

Commit

Permalink
Backport PowerDNS#4997
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterlexis committed Nov 13, 2017
2 parents 73e06bc + 75c04e9 commit 1a6d579
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion modules/remotebackend/httpconnector.cc
Expand Up @@ -80,10 +80,11 @@ std::string HTTPConnector::buildMemberListArgs(std::string prefix, const Json& a
for(const auto& pair: args.object_items()) {
if (pair.second.is_bool()) {
stream << (pair.second.bool_value()?"1":"0");
} else if (pair.second.is_null()) {
stream << prefix << "[" << pair.first << "]=";
} else {
stream << prefix << "[" << pair.first << "]=" << this->asString(pair.second);
}

stream << "&";
}

Expand Down
1 change: 1 addition & 0 deletions modules/remotebackend/regression-tests/dnsbackend.rb
Expand Up @@ -47,6 +47,7 @@ def parse_url(url)
}
when "list"
{
"id" => url.shift,
"zonename" => url.shift
}
when "getbeforeandafternamesabsolute", "getbeforeandafternames"
Expand Down
4 changes: 2 additions & 2 deletions modules/remotebackend/remotebackend.cc
Expand Up @@ -214,8 +214,8 @@ bool RemoteBackend::list(const DNSName& target, int domain_id, bool include_disa
{ "method", "list" },
{ "parameters", Json::object{
{ "zonename", target.toString() },
{ "domain-id", domain_id },
{ "include-disabled", include_disabled }
{ "domain_id", domain_id },
{ "include_disabled", include_disabled }
}}
};

Expand Down
1 change: 1 addition & 0 deletions modules/remotebackend/unittest_http.rb
Expand Up @@ -50,6 +50,7 @@ def parse_url(url)
}
when "list"
{
"id" => url.shift,
"zonename" => url.shift
}
when "getbeforeandafternamesabsolute", "getbeforeandafternames"
Expand Down

0 comments on commit 1a6d579

Please sign in to comment.