Message263720
During programming a function, that replaces a wget call, I noticed, that something is wrong with urllibs proxy handling.
I usually use the scheme "http_proxy= wget -N -nd URL" when I need to bypass the proxy. Hence I was pretty confused, that this doesn't work with python(3). Creating an empty ProxyHandler isn't the real Mc Coy either. Diving into the issue, I found getproxies_environment, but couldn't make much sense out of its behavior, up until I noticed, that
my OS (openSUSE ) creates both variants of environment variables behind the scenes: uppercase and lowercase.
Consequence: python3 needs the scheme "http_proxy= HTTP_PROXY= python3 ..."
Since I, like everyone else, prefer gentle tones over the loud, and want to spare this surprise for others in the future, I propose the attached patch.
Process environment variables in two passes, first uppercase, then lowercase, allowing an empty lowercase value to overrule any uppercase value.
Please consider applying this. |
|
Date |
User |
Action |
Args |
2016-04-19 08:18:29 | frispete | set | recipients:
+ frispete |
2016-04-19 08:18:29 | frispete | set | messageid: <1461053909.86.0.0123928931795.issue26804@psf.upfronthosting.co.za> |
2016-04-19 08:18:29 | frispete | link | issue26804 messages |
2016-04-19 08:18:29 | frispete | create | |
|