diff options
Diffstat (limited to 'src/uscxml/server/InterpreterServlet.cpp')
-rw-r--r-- | src/uscxml/server/InterpreterServlet.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/uscxml/server/InterpreterServlet.cpp b/src/uscxml/server/InterpreterServlet.cpp index b59cc05..49f6677 100644 --- a/src/uscxml/server/InterpreterServlet.cpp +++ b/src/uscxml/server/InterpreterServlet.cpp @@ -35,7 +35,22 @@ bool InterpreterServlet::httpRecvRequest(const HTTPServer::Request& req) { event.name = "http." + event.data.compound["type"].atom; event.origin = toStr((uintptr_t)req.curlReq); - event.initContent(event.data.compound["content"].atom); + + if (event.data.compound["content"]) { + if (event.data.compound["content"].compound.size() > 0) { + std::map<std::string, Data>::iterator compoundIter = event.data.compound["content"].compound.begin(); + while(compoundIter != event.data.compound["content"].compound.end()) { +// std::cout << compoundIter->second.atom << std::endl; + Data json = Data::fromJSON(compoundIter->second.atom); + if (json) { +// std::cout << Data::toJSON(json) << std::endl; + compoundIter->second = json; + } + compoundIter++; + } + } + } + _interpreter->receive(event); return true; } |