Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1124809

Browse files
bug #33853 [HttpClient] fix "no_proxy" option ignored in NativeHttpClient (Harry-Dunne)
This PR was merged into the 4.3 branch. Discussion ---------- [HttpClient] fix "no_proxy" option ignored in NativeHttpClient | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #33832 | License | MIT | Doc PR | Allow overriding of no_proxy environment variable by passing no_proxy option in NativeHttpClient::request() method. Commits ------- e4fb58d [HttpClient] Fixed #33832 NO_PROXY option ignored in NativeHttpClient::request() method
2 parents 1d0a077 + e4fb58d commit 1124809

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpClient/NativeHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public function request(string $method, string $url, array $options = []): Respo
203203
];
204204

205205
$proxy = self::getProxy($options['proxy'], $url);
206-
$noProxy = $_SERVER['no_proxy'] ?? $_SERVER['NO_PROXY'] ?? '';
206+
$noProxy = $options['no_proxy'] ?? $_SERVER['no_proxy'] ?? $_SERVER['NO_PROXY'] ?? '';
207207
$noProxy = $noProxy ? preg_split('/[\s,]+/', $noProxy) : [];
208208

209209
$resolveRedirect = self::createRedirectResolver($options, $host, $proxy, $noProxy, $info, $onProgress);

0 commit comments

Comments
 (0)