projects
/
pdns
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db3f25c
)
remotebackend: Treat NULL as empty string in POST parameters
author
Aki Tuomi
<cmouse@cmouse.fi>
Sun, 12 Feb 2017 08:32:55 +0000
(10:32 +0200)
committer
Pieter Lexis
<pieter.lexis@powerdns.com>
Tue, 7 Nov 2017 20:25:10 +0000
(21:25 +0100)
asString() cannot convert NULL to ""
(cherry picked from commit
4b8967c5f793810ad8ce399d155946c93e909bef
)
modules/remotebackend/httpconnector.cc
patch
|
blob
|
history
diff --git
a/modules/remotebackend/httpconnector.cc
b/modules/remotebackend/httpconnector.cc
index bdafa3a80c84f2ff89d8afa2458f38730aff10fd..a154da134d516a9dcef568d378d1d7af0d6ece2a 100644
(file)
--- a/
modules/remotebackend/httpconnector.cc
+++ b/
modules/remotebackend/httpconnector.cc
@@
-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 << "&";
}