add clear

This commit is contained in:
2020-08-13 10:56:00 +08:00
parent acd2583a20
commit aae5f9cea3
+4 -4
View File
@@ -664,11 +664,11 @@ class HttpClient
if (!empty($this->agent)) {
curl_setopt($ch, CURLOPT_USERAGENT, $this->agent);
}
if ($this->getSslCertFile()) {
curl_setopt($ch, CURLOPT_SSLCERT, $this->getSslCertFile());
if (file_exists($cert = $this->getSslCertFile())) {
curl_setopt($ch, CURLOPT_SSLCERT, $cert);
}
if ($this->getSslKeyFile()) {
curl_setopt($ch, CURLOPT_SSLKEY, $this->getSslKeyFile());
if (file_exists($key = $this->getSslKeyFile())) {
curl_setopt($ch, CURLOPT_SSLKEY, $key);
}
curl_setopt($ch, CURLOPT_NOBODY, FALSE);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); // 超时设置