summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/invoker/http
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-02-25 12:28:05 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-02-25 12:28:05 (GMT)
commit49c3c43d18c9cce6de305aae77cc8bd839506129 (patch)
treecfc4ea84416c76e8bbe3e27d2918321115b61e24 /src/uscxml/plugins/invoker/http
parent47956a35d11495f2ebf6988c7f9d9dffe0bd3a4b (diff)
downloaduscxml-49c3c43d18c9cce6de305aae77cc8bd839506129.zip
uscxml-49c3c43d18c9cce6de305aae77cc8bd839506129.tar.gz
uscxml-49c3c43d18c9cce6de305aae77cc8bd839506129.tar.bz2
Introduced postpone element and reorganized http request representation as events
Diffstat (limited to 'src/uscxml/plugins/invoker/http')
-rw-r--r--src/uscxml/plugins/invoker/http/HTTPServletInvoker.cpp13
-rw-r--r--src/uscxml/plugins/invoker/http/HTTPServletInvoker.h2
2 files changed, 3 insertions, 12 deletions
diff --git a/src/uscxml/plugins/invoker/http/HTTPServletInvoker.cpp b/src/uscxml/plugins/invoker/http/HTTPServletInvoker.cpp
index 78e3bea..753877c 100644
--- a/src/uscxml/plugins/invoker/http/HTTPServletInvoker.cpp
+++ b/src/uscxml/plugins/invoker/http/HTTPServletInvoker.cpp
@@ -117,25 +117,16 @@ void HTTPServletInvoker::httpRecvRequest(const HTTPServer::Request& req) {
_requests[toStr((uintptr_t)req.curlReq)] = req;
- Event event;
+ Event event = req;
if (_isInterpreterGlobal) {
- event.name = "http." + req.type;
+ event.name = "http." + event.data.compound["type"].atom;
event.origin = toStr((uintptr_t)req.curlReq);
} else {
event.name = _callback;
event.data.compound["reqId"] = Data(toStr((uintptr_t)req.curlReq), Data::VERBATIM);
}
- std::map<std::string, std::string>::const_iterator headerIter = req.headers.begin();
- while(headerIter != req.headers.end()) {
- event.data.compound["headers"].compound[headerIter->first] = Data(headerIter->second, Data::VERBATIM);
- headerIter++;
- }
-
- event.data.compound["content"] = Data(req.content, Data::VERBATIM);
- event.data.compound["type"] = Data(req.type, Data::VERBATIM);
-
returnEvent(event);
}
diff --git a/src/uscxml/plugins/invoker/http/HTTPServletInvoker.h b/src/uscxml/plugins/invoker/http/HTTPServletInvoker.h
index 4ac87e0..c9fe844 100644
--- a/src/uscxml/plugins/invoker/http/HTTPServletInvoker.h
+++ b/src/uscxml/plugins/invoker/http/HTTPServletInvoker.h
@@ -19,7 +19,7 @@ public:
virtual std::set<std::string> getNames() {
std::set<std::string> names;
- names.insert("httpserver");
+ names.insert("httpservlet");
names.insert("http://uscxml.tk.informatik.tu-darmstadt.de/#httpserver");
return names;
}