summaryrefslogtreecommitdiffstats
path: root/src/uscxml/server/HTTPServer.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-08-15 19:34:34 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-08-15 19:34:34 (GMT)
commit940de61e5b6d8651f6ea8b1626c92f5d80cb723c (patch)
tree5496b8b5274d9333794f90acdc31b39001707be9 /src/uscxml/server/HTTPServer.cpp
parent9149b28c87c7a037dfd244aa5d4c1409b6593dca (diff)
downloaduscxml-940de61e5b6d8651f6ea8b1626c92f5d80cb723c.zip
uscxml-940de61e5b6d8651f6ea8b1626c92f5d80cb723c.tar.gz
uscxml-940de61e5b6d8651f6ea8b1626c92f5d80cb723c.tar.bz2
Polished xhtml invoker
Diffstat (limited to 'src/uscxml/server/HTTPServer.cpp')
-rw-r--r--src/uscxml/server/HTTPServer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp
index bbcbd37..48d2f96 100644
--- a/src/uscxml/server/HTTPServer.cpp
+++ b/src/uscxml/server/HTTPServer.cpp
@@ -408,7 +408,10 @@ void HTTPServer::httpRecvReqCallback(struct evhttp_request *req, void *callbackD
}
request.data.compound["content"].atom.clear();
} else if (iequals(contentType.substr(0, 16), "application/json")) {
- request.data.compound["content"] = Data::fromJSON(request.data.compound["content"].atom);
+ Data json = Data::fromJSON(request.data.compound["content"].atom);
+ if (!json.empty()) {
+ request.data.compound["content"] = json;
+ }
} else if (iequals(contentType.substr(0, 15), "application/xml")) {
NameSpacingParser parser = NameSpacingParser::fromXML(request.data.compound["content"].atom);
if (parser.errorsReported()) {