add clear

This commit is contained in:
2020-05-22 14:53:59 +08:00
parent ebede84969
commit caf2960d4a
+6 -2
View File
@@ -633,8 +633,12 @@ class HttpClient
if (!empty($this->agent)) {
curl_setopt($ch, CURLOPT_USERAGENT, $this->agent);
}
curl_setopt($ch, CURLOPT_SSLCERT, $this->getSslCertFile());
if (!empty($this->getSslCertFile())) {
curl_setopt($ch, CURLOPT_SSLCERT, $this->getSslCertFile());
}
if (!empty($this->getSslCertFile())) {
curl_setopt($ch, CURLOPT_SSLCERT, $this->getSslCertFile());
}
curl_setopt($ch, CURLOPT_SSLKEY, $this->getSslKeyFile());
curl_setopt($ch, CURLOPT_NOBODY, FALSE);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); // 超时设置