diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2012-12-21 18:07:12 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2012-12-21 18:07:12 (GMT) |
commit | 501e7730acc35934dee481207a7a6c6575b1b342 (patch) | |
tree | bbe3ee14d7117edf67aa0bb927905a1bf2a9a379 /src | |
parent | 6f6cb84cfdeb97db4303bf520549969794ac3499 (diff) | |
download | uscxml-501e7730acc35934dee481207a7a6c6575b1b342.zip uscxml-501e7730acc35934dee481207a7a6c6575b1b342.tar.gz uscxml-501e7730acc35934dee481207a7a6c6575b1b342.tar.bz2 |
Fixed automatic port selection when none given in URL
Diffstat (limited to 'src')
-rw-r--r-- | src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.cpp b/src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.cpp index bed9f98..78ecbe3 100644 --- a/src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.cpp +++ b/src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.cpp @@ -83,7 +83,7 @@ void EventIOProcessor::send(SendRequest& req) { char uriBuf[1024]; struct evhttp_uri* targetURI = evhttp_uri_parse(_sendData[req.sendid].req.target.c_str()); - if (evhttp_uri_get_port(targetURI) == 0) + if (evhttp_uri_get_port(targetURI) < 0) evhttp_uri_set_port(targetURI, 80); const char* hostName = evhttp_uri_get_host(targetURI); @@ -135,6 +135,7 @@ void EventIOProcessor::send(SendRequest& req) { if (req.params.size() > 0) { std::multimap<std::string, std::string>::iterator paramIter = req.params.begin(); while (paramIter != req.params.end()) { +// LOG(INFO) << paramIter->first << " = " << paramIter->second << std::endl; evhttp_add_header(evhttp_request_get_output_headers(httpReq), paramIter->first.c_str(), evhttp_encode_uri(paramIter->second.c_str())); |