diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2016-04-15 18:38:07 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2016-04-15 18:38:07 +0300 |
commit | 35c4abd874ea7c703ea2e0ab9a94745211f0d26e (patch) | |
tree | 72ee702e2d882440984bb8422f511139b80444f5 /moses/server | |
parent | 63eefe03fd61136cfe529234a68ce6384daa44bf (diff) |
Bug fix: make server interface recognize booleans encoded as proper xmlrpc_c::value_boolean when parsing requests.
Diffstat (limited to 'moses/server')
-rw-r--r-- | moses/server/TranslationRequest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/moses/server/TranslationRequest.cpp b/moses/server/TranslationRequest.cpp index 173ad5d40..c8571ffce 100644 --- a/moses/server/TranslationRequest.cpp +++ b/moses/server/TranslationRequest.cpp @@ -235,6 +235,10 @@ check(std::map<std::string, xmlrpc_c::value> const& param, { std::map<std::string, xmlrpc_c::value>::const_iterator m = param.find(key); if(m == param.end()) return false; + + if (m->second.type() == xmlrpc_c::value::TYPE_BOOLEAN) + return xmlrpc_c::value_boolean(m->second); + std::string val = string(xmlrpc_c::value_string(m->second)); if(val == "true" || val == "True" || val == "TRUE" || val == "1") return true; return false; |