Closed
Description
Symfony version(s) affected: 4.3.4
Description
Overriding HTTP Proxy settings in $options argument passed to NativeHttpClient::request() method works for "proxy" option but doesn't work for "no_proxy" option.
How to reproduce
Call the NativeHttpClient::request() method with options overriding your proxy settings in environment variables:
$client = HttpClient::create();
$client->request('GET', 'http://my-host.com/', [
'no_proxy' => 'my-host',
]);
Possible Solution
I think that the bug lies in this line:
Possible fix:
$noProxy = $options['no_proxy'] ?? $_SERVER['no_proxy'] ?? $_SERVER['NO_PROXY'] ?? '';