guzzle
guzzle copied to clipboard
[8.0] Final for no proxy settings for all php versions
Fix for issue mentioned in https://github.com/guzzle/guzzle/issues/3163
Is this an issue with curl or PHP? I am reluctant to revert this and re-break the issue this was fixing. Do you know the exact last version of libcurl that has this issue, if this a PHP issue, the exact last version of PHP to have this issue?
I'll leave this PR on hold till we have that information.
Is this an issue with curl or PHP? I am reluctant to revert this and re-break the issue this was fixing. Do you know the exact last version of libcurl that has this issue, if this a PHP issue, the exact last version of PHP to have this issue?
I'll leave this PR on hold till we have that information.
It is a curl issue, not php. cURL version: 8.2.1 (hint: php -i | grep cURL) but it worked the same wrong on earlier 8.1 too
Ok, so what is the latest version of curl where this is broken, so we can decide if this is actually something we want to support? (not what is the latest version of curl)
As I said it is broken on the 8.2.1 which is currently latest stable. It has been broken and worked this way for years. 7.29 is the oldest I can test with and since that version it has never worked correctly.
I believe it has nothing to do with cURL as the cURL behaves quite predictable. It is an improper handling of the proxy settings by the guzzle. If we want to not use proxy for some domain we should force the curl having it in NO_PROXY setting instead of leaving it unset which leads to falling back to the ENV settings
@GrahamCampbell
In short: my old fix was not a real fix. :/
Explanation:
The reason is that first i added $conf[\CURLOPT_PROXY] = ''; . This should have been okay. But then tests failed, so i accidentally added this: unset($conf[\CURLOPT_PROXY]); . Which is not a real fix, since we wanted to specifically set CURLOPT_PROXY to be empty, unsetting it does nothing :/
The reason now i want both CURLOPT_PROXY ='' and CURLOPT_NOPROXY set to the added values cause in older php versions CURLOPT_NOPROXY is not working. So setting both is the ultimate solution.
I'm wondering if Guzzle 8.0 is the best place to fix this. I'm very conscious of breaking things for people.