mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-31 03:52:01 +08:00
Hard to solve issue 4 "Curl error code CURLE_URL_MALFORMAT" so we log the url
This commit is contained in:
parent
39ba67de4b
commit
aea3389bf2
2 changed files with 5 additions and 5 deletions
|
@ -491,13 +491,13 @@ class PdoAddressBook
|
|||
$aUrl = array();
|
||||
}
|
||||
|
||||
$aUrl['scheme'] = isset($aUrl['scheme']) ? $aUrl['scheme'] : 'http';
|
||||
$aUrl['host'] = isset($aUrl['host']) ? $aUrl['host'] : 'localhost';
|
||||
$aUrl['port'] = isset($aUrl['port']) ? $aUrl['port'] : 80;
|
||||
$aUrl['scheme'] = $aUrl['scheme'] ?? 'http';
|
||||
$aUrl['host'] = $aUrl['host'] ?? 'localhost';
|
||||
$aUrl['port'] = $aUrl['port'] ?? 0;
|
||||
$aUrl['path'] = isset($aUrl['path']) ? \rtrim($aUrl['path'], '\\/').'/' : '/';
|
||||
|
||||
$aSettings = array(
|
||||
'baseUri' => $aUrl['scheme'].'://'.$aUrl['host'].('80' === (string) $aUrl['port'] ? '' : ':'.$aUrl['port']),
|
||||
'baseUri' => $aUrl['scheme'].'://'.$aUrl['host'].($aUrl['port'] ? ':'.$aUrl['port'] : ''),
|
||||
'userName' => $sUser,
|
||||
'password' => $sPassword
|
||||
);
|
||||
|
|
|
@ -418,7 +418,7 @@ class Client {
|
|||
);
|
||||
|
||||
if ($curlErrNo) {
|
||||
throw new Exception('[CURL] Error while making request: ' . $curlError . ' (error code: ' . $curlErrNo . ')');
|
||||
throw new Exception('[CURL] Error while making request: ' . $curlError . ' (error code: ' . $curlErrNo . ', uri: ' . $url . ')');
|
||||
}
|
||||
|
||||
if ($response['statusCode']>=400) {
|
||||
|
|
Loading…
Reference in a new issue