diff options
Diffstat (limited to 'src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp')
-rw-r--r-- | src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp index 7564f1d..09195bf 100644 --- a/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp +++ b/src/uscxml/plugins/ioprocessor/basichttp/BasicHTTPIOProcessor.cpp @@ -104,8 +104,9 @@ void BasicHTTPIOProcessor::httpRecvRequest(const HTTPServer::Request& req) { } #endif + /// test532 if (reqEvent.name.length() == 0) - reqEvent.name = req.type; + reqEvent.name = "http." + req.data.compound.at("type").atom; if (!scxmlStructFound) { // get content into event @@ -117,10 +118,15 @@ void BasicHTTPIOProcessor::httpRecvRequest(const HTTPServer::Request& req) { } void BasicHTTPIOProcessor::send(const SendRequest& req) { - + + if (req.target.length() == 0) { + _interpreter->receiveInternal(Event("error.communication", Event::PLATFORM)); + return; + } + bool isLocal = false; std::string target; - if (req.target.length() > 0 && !boost::equals(req.target, _url)) { + if (!boost::equals(req.target, _url)) { target = req.target; } else { isLocal = true; |