diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2019-02-13 18:01:08 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-02-13 18:24:36 +0100 |
commit | f98a7f05925da20a6a499a1d089a41678c017e17 (patch) | |
tree | 1facd268bde82d1e49aac15058ec2c743f41a66e /test/helpers.hpp | |
parent | e3b17cdc3c1a282473c0b34282e4b8fc99286e31 (diff) |
Improve unit test / SSL handling & detection.
Change-Id: I6bd3116ac94d3d2c61e2ec543cb17896834ef2df
Diffstat (limited to 'test/helpers.hpp')
-rw-r--r-- | test/helpers.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/helpers.hpp b/test/helpers.hpp index 13b351762..bc4818d98 100644 --- a/test/helpers.hpp +++ b/test/helpers.hpp @@ -160,10 +160,10 @@ inline Poco::Net::HTTPClientSession* createSession(const Poco::URI& uri) { #if ENABLE_SSL - return new Poco::Net::HTTPSClientSession(uri.getHost(), uri.getPort()); -#else - return new Poco::Net::HTTPClientSession(uri.getHost(), uri.getPort()); + if (uri.getScheme() == "https") + return new Poco::Net::HTTPSClientSession(uri.getHost(), uri.getPort()); #endif + return new Poco::Net::HTTPClientSession(uri.getHost(), uri.getPort()); } inline |