diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-07-03 15:04:26 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2017-07-03 15:04:26 (GMT) |
commit | 19d4e8ae2e472dd364ffeff1e096d3f75d5251c4 (patch) | |
tree | f006846b1f4bf207d0c8229b52d4948bb1497b63 /src/uscxml/Interpreter.cpp | |
parent | fbda090a39ad02c937345bee204ca3f77106b2bf (diff) | |
download | uscxml-19d4e8ae2e472dd364ffeff1e096d3f75d5251c4.zip uscxml-19d4e8ae2e472dd364ffeff1e096d3f75d5251c4.tar.gz uscxml-19d4e8ae2e472dd364ffeff1e096d3f75d5251c4.tar.bz2 |
BEnchmarks and performance improvements
Diffstat (limited to 'src/uscxml/Interpreter.cpp')
-rw-r--r-- | src/uscxml/Interpreter.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/uscxml/Interpreter.cpp b/src/uscxml/Interpreter.cpp index 59a5084..b20013f 100644 --- a/src/uscxml/Interpreter.cpp +++ b/src/uscxml/Interpreter.cpp @@ -23,6 +23,7 @@ #include "uscxml/interpreter/InterpreterImpl.h" #include "uscxml/util/DOM.h" #include "uscxml/util/URL.h" +#include "uscxml/util/MD5.hpp" #include <xercesc/parsers/XercesDOMParser.hpp> #include <xercesc/framework/MemBufInputSource.hpp> @@ -81,6 +82,7 @@ Interpreter Interpreter::fromXML(const std::string& xml, const std::string& base interpreterImpl->_document = parser->adoptDocument(); interpreterImpl->_baseURL = absUrl; + interpreterImpl->_md5 = md5(xml); InterpreterImpl::addInstance(interpreterImpl); } catch (const XERCESC_NS::SAXParseException& toCatch) { @@ -147,12 +149,10 @@ Interpreter Interpreter::fromDocument(XERCESC_NS::DOMDocument* dom, const std::s Interpreter Interpreter::fromURL(const std::string& url) { URL absUrl = normalizeURL(url); -#ifdef _WIN32 +#if 1 // Xercesc is hard to build with SSL on windows, whereas curl uses winssl - if (absUrl.scheme() == "https") { - return fromXML(absUrl.getInContent(), absUrl); - } -#endif + return fromXML(absUrl.getInContent(), absUrl); +#else std::shared_ptr<InterpreterImpl> interpreterImpl(new InterpreterImpl()); Interpreter interpreter(interpreterImpl); @@ -187,6 +187,7 @@ Interpreter Interpreter::fromURL(const std::string& url) { } return interpreter; +#endif } |