1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-01-29 19:27:34 +01:00

take pull request comments

This commit is contained in:
fred 2015-08-12 13:00:17 +02:00
parent 20c38fe3f8
commit b8e2108f46
2 changed files with 3 additions and 3 deletions

View File

@ -173,7 +173,7 @@ class Client implements ClientInterface
}
if ($noProxy = getenv('NO_PROXY')) {
$cleanedNoProxy = preg_replace('/\s/', '', $noProxy);
$cleanedNoProxy = str_replace(' ', '', $noProxy);
$defaults['proxy']['no'] = explode(',', $cleanedNoProxy);
}

View File

@ -363,7 +363,7 @@ class CurlFactory implements CurlFactoryInterface
$conf[CURLOPT_PROXY] = $options['proxy'];
} elseif ($scheme = $easy->request->getUri()->getScheme()) {
$host = $easy->request->getUri()->getHost();
if(!isset($options['proxy']['no'])
if (!isset($options['proxy']['no'])
||!$this->isHostInProxyArea($host, $options['proxy']['no'])) {
if (isset($options['proxy'][$scheme])) {
$conf[CURLOPT_PROXY] = $options['proxy'][$scheme];
@ -437,7 +437,7 @@ class CurlFactory implements CurlFactoryInterface
$delimiter = '#';
$areaToMatch = preg_quote($areaToMatch, $delimiter);
$areaToMatch = str_replace('\*', '.*', $areaToMatch);
if(preg_match("$delimiter^$areaToMatch$$delimiter", $host)) {
if (preg_match("$delimiter^$areaToMatch$$delimiter", $host)) {
$matches = true;
break;
}