fix non-ssl build
This commit is contained in:
@@ -344,11 +344,11 @@ bool HttpClient::parseUrl(const string& url, string* proto, string* host, uint16
|
||||
if (!isSsl && *proto != "http") {
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
#else // HAVE_SSL
|
||||
if (*proto != "http") {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
#endif // HAVE_SSL
|
||||
size_t pos = url.find('/', hostPos);
|
||||
if (pos == hostPos) {
|
||||
return false;
|
||||
@@ -387,12 +387,12 @@ bool HttpClient::connect(const string& host, const uint16_t port, bool https, co
|
||||
#ifdef HAVE_SSL
|
||||
m_socket = SSLSocket::connect(host, port, https, timeout, s_caFile, s_caPath);
|
||||
m_https = https;
|
||||
#else
|
||||
#else // HAVE_SSL
|
||||
if (https) {
|
||||
return false;
|
||||
}
|
||||
m_socket = TCPSocket::connect(host, port, timeout);
|
||||
#endif
|
||||
#endif // HAVE_SSL
|
||||
if (!m_socket) {
|
||||
return false;
|
||||
}
|
||||
@@ -410,9 +410,9 @@ bool HttpClient::reconnect() {
|
||||
}
|
||||
#ifdef HAVE_SSL
|
||||
m_socket = SSLSocket::connect(m_host, m_port, m_https, m_timeout, s_caFile, s_caPath);
|
||||
#else
|
||||
#else // HAVE_SSL
|
||||
m_socket = TCPSocket::connect(m_host, m_port, m_timeout);
|
||||
#endif
|
||||
#endif // HAVE_SSL
|
||||
if (!m_socket) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user