summaryrefslogtreecommitdiff
path: root/src/XmlRpcRequestParserController.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/XmlRpcRequestParserController.cc')
-rw-r--r--src/XmlRpcRequestParserController.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/XmlRpcRequestParserController.cc b/src/XmlRpcRequestParserController.cc
index 25a5addc..a3c9a857 100644
--- a/src/XmlRpcRequestParserController.cc
+++ b/src/XmlRpcRequestParserController.cc
@@ -54,7 +54,7 @@ void XmlRpcRequestParserController::popStructFrame()
Dict* dict = downcast<Dict>(parentFrame.value_);
assert(dict);
frameStack_.pop();
- if (currentFrame_.validMember()) {
+ if (currentFrame_.validMember(allowEmptyMemberName_)) {
dict->put(std::move(currentFrame_.name_), std::move(currentFrame_.value_));
}
currentFrame_ = std::move(parentFrame);
@@ -110,6 +110,11 @@ void XmlRpcRequestParserController::setMethodName(std::string methodName)
methodName_ = std::move(methodName);
}
+void XmlRpcRequestParserController::setAllowEmptyMemberName(bool b)
+{
+ allowEmptyMemberName_ = b;
+}
+
} // namespace rpc
} // namespace aria2