The std::string compare() method is like strcmp(): it returns 0 on equality

Change-Id: I4d080afd98419cbdaa531cc6f2c306533bbc1737
This commit is contained in:
Tor Lillqvist
2018-07-10 21:22:07 +03:00
parent c783485a3b
commit 73dbf27ede

View File

@ -96,7 +96,7 @@ public:
Poco::URI uri(_app._serverURI);
Poco::Net::HTTPClientSession *session;
if (_app._serverURI.compare(0, 5, "https"))
if (_app._serverURI.compare(0, 5, "https") == 0)
session = new Poco::Net::HTTPSClientSession(uri.getHost(), uri.getPort());
else
session = new Poco::Net::HTTPClientSession(uri.getHost(), uri.getPort());