mirror of
https://github.com/guzzle/guzzle.git
synced 2025-01-17 13:28:13 +01:00
Fix NO_PROXY
settings (#3117)
This commit is contained in:
parent
242f1283b0
commit
c6f3a35d50
@ -443,7 +443,9 @@ class CurlFactory implements CurlFactoryInterface
|
||||
$scheme = $easy->request->getUri()->getScheme();
|
||||
if (isset($options['proxy'][$scheme])) {
|
||||
$host = $easy->request->getUri()->getHost();
|
||||
if (!isset($options['proxy']['no']) || !Utils::isHostInNoProxy($host, $options['proxy']['no'])) {
|
||||
if (isset($options['proxy']['no']) && Utils::isHostInNoProxy($host, $options['proxy']['no'])) {
|
||||
unset($conf[\CURLOPT_PROXY]);
|
||||
} else {
|
||||
$conf[\CURLOPT_PROXY] = $options['proxy'][$scheme];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user