优化代码

This commit is contained in:
xiongziliang
2018-11-27 11:05:44 +08:00
parent 858d2996c4
commit ad25ea184c
8 changed files with 16 additions and 16 deletions

View File

@@ -41,10 +41,10 @@ void HttpClient::sendRequest(const string &strUrl, float fTimeOutSec) {
auto protocol = FindField(strUrl.data(), NULL, "://");
uint16_t defaultPort;
bool isHttps;
if (toolkit::strcasecmp(protocol.data(), "http") == 0) {
if (strcasecmp(protocol.data(), "http") == 0) {
defaultPort = 80;
isHttps = false;
} else if (toolkit::strcasecmp(protocol.data(), "https") == 0) {
} else if (strcasecmp(protocol.data(), "https") == 0) {
defaultPort = 443;
isHttps = true;
} else {