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:
parent
20c38fe3f8
commit
b8e2108f46
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user