diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-06-10 22:47:14 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-06-10 22:47:14 (GMT) |
commit | 6f56474450b7c54f2c95b5dea6a7a42623141649 (patch) | |
tree | 420c52085d8cf778360c09baf9722b21d01259da /src/uscxml/server | |
parent | a154682fc1b25581742d38dd5fe9aa06ede167b7 (diff) | |
download | uscxml-6f56474450b7c54f2c95b5dea6a7a42623141649.zip uscxml-6f56474450b7c54f2c95b5dea6a7a42623141649.tar.gz uscxml-6f56474450b7c54f2c95b5dea6a7a42623141649.tar.bz2 |
W3C MMI Architecture framework
Diffstat (limited to 'src/uscxml/server')
-rw-r--r-- | src/uscxml/server/HTTPServer.cpp | 5 | ||||
-rw-r--r-- | src/uscxml/server/HTTPServer.h | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp index 70b272f..bd24326 100644 --- a/src/uscxml/server/HTTPServer.cpp +++ b/src/uscxml/server/HTTPServer.cpp @@ -164,6 +164,10 @@ void HTTPServer::httpRecvReqCallback(struct evhttp_request *req, void *callbackD request.data.compound["path"] = Data(evhttp_uri_get_path(evhttp_request_get_evhttp_uri(req)), Data::VERBATIM); raw << " " << request.data.compound["path"].atom; + const char* query = evhttp_uri_get_query(evhttp_request_get_evhttp_uri(req)); + if (query) + raw << "?" << std::string(query); + raw << " HTTP/" << request.data.compound["httpMajor"].atom << "." << request.data.compound["httpMinor"].atom; raw << std::endl; @@ -197,7 +201,6 @@ void HTTPServer::httpRecvReqCallback(struct evhttp_request *req, void *callbackD // parse query string struct evkeyvalq params; struct evkeyval *param; - const char* query = evhttp_uri_get_query(evhttp_request_get_evhttp_uri(req)); evhttp_parse_query_str(query, ¶ms); for (param = params.tqh_first; param; param = param->next.tqe_next) { diff --git a/src/uscxml/server/HTTPServer.h b/src/uscxml/server/HTTPServer.h index 7356737..bd54166 100644 --- a/src/uscxml/server/HTTPServer.h +++ b/src/uscxml/server/HTTPServer.h @@ -20,6 +20,10 @@ public: Request() : curlReq(NULL) {} std::string content; struct evhttp_request* curlReq; + + operator bool() { + return curlReq != NULL; + } }; class Reply { |