Added: ResponseCollection::getCapabilityResult()

Bugfix: ResponseCollection $oResult => $this
Removed safe_mode detection
Speedup: ImapClient::partialParseResponseBranch() and partialResponseLiteralCallbackCallable()
This commit is contained in:
djmaze 2020-03-24 14:45:09 +01:00
parent b9c019e05c
commit cd3d8b94b2
6 changed files with 177 additions and 234 deletions

View file

@ -325,14 +325,11 @@ class Http
static public function DetectAndHackFollowLocationUrl(string $sUrl, array &$aOptions, ?\MailSo\Log\Logger $oLogger = null) : string
{
$sSafeMode = \strtolower(\trim(\ini_get('safe_mode')));
$bSafeMode = 'on' === $sSafeMode || '1' === $sSafeMode;
$sNewUrl = null;
$sUrl = isset($aOptions[CURLOPT_URL]) ? $aOptions[CURLOPT_URL] : $sUrl;
if (isset($aOptions[CURLOPT_FOLLOWLOCATION]) && $aOptions[CURLOPT_FOLLOWLOCATION] && 0 < \strlen($sUrl) &&
($bSafeMode || \ini_get('open_basedir') !== ''))
\ini_get('open_basedir') !== '')
{
$aOptions[CURLOPT_FOLLOWLOCATION] = false;