add clear

This commit is contained in:
2020-12-02 18:50:30 +08:00
parent aec9c53e5a
commit ce0255b2c5
+3 -7
View File
@@ -657,15 +657,11 @@ class HttpClient
curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout); // 超时设置
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->timeout); // 超时设置
}
curl_setopt($ch, CURLOPT_HEADER, true);
var_dump($url, $this->parseHeaderMat());
if ($headers = $this->parseHeaderMat()) {
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
}
if (!empty($this->agent)) {
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $this->parseHeaderMat());
curl_setopt($ch, CURLOPT_USERAGENT, $this->agent);
}
if (file_exists($cert = $this->getSslCertFile())) {
curl_setopt($ch, CURLOPT_SSLCERT, $cert);
}