[Python-Dev] Needed tester for patch in urllib.py module

Johannes Nicolai johannes.nicolai at hpi.uni-potsdam.de
Thu Dec 15 19:52:14 CET 2005


I have written a patch, that will enable urllib.py to use http and https 
proxies with password authentification, if the password is stored in the 
corresponding environment variable (e. g. 
http_proxy=password:username at www.foo.com)

If a http or https proxy requires authentification, but there was no entry in 
the environment variable, the password is asked from the user and stored for 
succeeding attempts.

While writing the patch, I recognized, that the old code will give a 
traceback, if an environment variable for a protocol is set, where proxy 
support is not (yet) supported in urllib.py (e. g. ftp protocol)
My patch will raise a meaningful exception in this case.

Finally, I noticed, that the old implementation of the https_proxy code is 
incorrect, if some page accessed via the https_proxy requires authorization. 
In this case, the user has to enter the password and then is directly 
directed to the page where the proxy is skipped.
I have fixed this problem too.

The patch was intensively tested with squid 2.5 and squid 3.0 (supports https 
protocol as a proxy) and applies to the trunk in the subversion repository.

You can find the patch and its history on
https://sourceforge.net/tracker/?func=detail&aid=1349118&group_id=5470&atid=305470

Mr. van Rossum asked me, whether I could find a developer on this list in 
order to test the patch.
Any help would be appreciated.

Thanks in advance

Johannes Nicolai


More information about the Python-Dev mailing list