From 3af3b37ea0d9c6ddb8e56d8103d235445c24ac09 Mon Sep 17 00:00:00 2001 From: WangNingkai <1655586865@qq.com> Date: Fri, 7 Dec 2018 08:54:46 +0800 Subject: [PATCH] bugfix --- CHANGELOG.md | 6 ++++++ app/Helpers/GraphRequest.php | 4 ++-- app/Helpers/Tool.php | 5 +---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c75831bb..17c2b6c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ / /_/ / /___/ ___ |_/ // /| / /_/ / /___ / | \____/_____/_/ |_/___/_/ |_/_____/_____//_/|_| ``` +## 2018.12.07 + +- fix curl:35 错误 +``` +{"code":35,"msg":"SSL connect error: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection toxxx:443"} +``` ## 2018.12.06 - 更换核心请求类,优化报错显示 diff --git a/app/Helpers/GraphRequest.php b/app/Helpers/GraphRequest.php index e3078913..215a3f6c 100644 --- a/app/Helpers/GraphRequest.php +++ b/app/Helpers/GraphRequest.php @@ -126,16 +126,16 @@ public function request( $curl = new Curl(); } $curl->setHeaders($this->headers); + $curl->setRetry(3); $curl->setConnectTimeout(5); $curl->setTimeout((int)$this->timeout); $curl->setUrl($this->endpoint); - $curl->setRetry(3); $curl->setOpts($options); $curl->exec(); $curl->close(); if ($curl->error) { Log::error( - 'OneDriveGraph Graph API Err', + 'Get OneDrive source content error.', [ 'errno' => $curl->errorCode, 'msg' => $curl->errorMessage, diff --git a/app/Helpers/Tool.php b/app/Helpers/Tool.php index f4822255..0684f88a 100644 --- a/app/Helpers/Tool.php +++ b/app/Helpers/Tool.php @@ -446,15 +446,12 @@ public static function getFileContent($url, $cache = true) CURLOPT_FAILONERROR => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_ENCODING => 'gzip,deflate', - CURLOPT_SSL_VERIFYHOST => false, - CURLOPT_SSL_VERIFYPEER => false, - CURLOPT_SSL_VERIFYSTATUS => false, ]); $curl->get($url); $curl->close(); if ($curl->error) { Log::error( - 'Get OneDriveGraph FileContent Err', + 'Get OneDrive file content error.', [ 'code' => $curl->errorCode, 'msg' => $curl->errorMessage,