[HttpClient] Allow the HTTP_PROXY environment variable lookup with phpdbg
This commit is contained in:
parent
ca290396fb
commit
fbd439e0bd
@ -258,7 +258,7 @@ final class NativeHttpClient implements HttpClientInterface, LoggerAwareInterfac
|
|||||||
{
|
{
|
||||||
if (null === $proxy) {
|
if (null === $proxy) {
|
||||||
// Ignore HTTP_PROXY except on the CLI to work around httpoxy set of vulnerabilities
|
// Ignore HTTP_PROXY except on the CLI to work around httpoxy set of vulnerabilities
|
||||||
$proxy = $_SERVER['http_proxy'] ?? ('cli' === \PHP_SAPI ? $_SERVER['HTTP_PROXY'] ?? null : null) ?? $_SERVER['all_proxy'] ?? $_SERVER['ALL_PROXY'] ?? null;
|
$proxy = $_SERVER['http_proxy'] ?? (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? $_SERVER['HTTP_PROXY'] ?? null : null) ?? $_SERVER['all_proxy'] ?? $_SERVER['ALL_PROXY'] ?? null;
|
||||||
|
|
||||||
if ('https:' === $url['scheme']) {
|
if ('https:' === $url['scheme']) {
|
||||||
$proxy = $_SERVER['https_proxy'] ?? $_SERVER['HTTPS_PROXY'] ?? $proxy;
|
$proxy = $_SERVER['https_proxy'] ?? $_SERVER['HTTPS_PROXY'] ?? $proxy;
|
||||||
|
Reference in New Issue
Block a user