Hard to solve issue 4 "Curl error code CURLE_URL_MALFORMAT" so we log the url

This commit is contained in:
djmaze 2020-08-30 17:34:58 +02:00
parent 39ba67de4b
commit aea3389bf2
2 changed files with 5 additions and 5 deletions

View file

@ -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
);

View file

@ -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) {