jjlee/mechanize — pull request #102 by fioan89 (2014-12-07 13:04:16+00:00)
Title: Mechanize doesn't support basic proxy authorization through https calls.

This commit ports the https://hg.python.org/cpython/rev/10970f64ba33/ issue to urllib2 fork. More details can be found at https://bugs.python.org/issue7291. I've tested the code with python 2.7.6 and ran the unittests. This changes will work assuming that the fix for httplib is included in python standard lib.

I've modified the ullib2_fork to forward the headers to the proxy tunnel. By default the headers were sent to the target server instead of proxy server. This should not be a problem after porting the commit from the above bug. Please note that fix for https://bugs.python.org/issue7291 was scattered through httplib and urllib2. Since for python 2.6.4 and above the standard httplib is used, there was no need for full back-port.