requests
requests copied to clipboard
Fix no_proxy and no, not being respected. Merge self.proxies and proxies
Since no_proxy is not working as intended, I tried fixing it with least intrsion into whole process.
It is contained to the merge_environment_settings and request function. In the request the proxy from request and proxy from session are merged. Having the request proxy overwrite the session proxy where needed.
The should_bypass_proxies is applied outside get_environ_proxies in merge_environment_settings, since no_proxy is only applied to OS ENV and not the proxies set in requests or Sessions
Should close #4871, I hope.
This patched fixed #5731 for me. I was very surprised this patch has not gotten any attention yet. Is there anything missing before it can be considered?
Hi @Suika and @RichieB2B, we are also dealing with this issue, any updates?
I found a work around that I described at https://github.com/psf/requests/issues/5731#issuecomment-1162215349 and in #6172
Hi, we are also being hit by that and would appreciate if this issue would be fixed.
Also being hit by this; in our case it's setting proxies on the Session instance, but then the call to proxies = merge_settings(...) basically doesn't respect should_bypass_proxy() because it happens later.