[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Martin Panter added the comment: In the meantime, Issue 24599 has been opened about URLopener(), which I understand is related to the Python 2 “urllib” half of this bug. Since this issue has been closed, perhaps it is best to continue discussion of issue1424152-py27-urllib.diff there instead. -- dependencies: +urllib URLopener().open https url returns 501 Not Implemented when https_proxy env var is http:// nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil Kumaran added the comment: I have a slight fear that this patch could be considered as a feature addition in 2.7 urllib.py, I would like to quell that and ensure that behaviour expectation is consistent when using urllib or urllib2 and latest urllib/request.py modules. Also, tests + docs can help a lot in speedier reviews. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Lukas Wunner added the comment: *ping* Anybody, please consider applying the patch I've submitted August 8th so that this issue gets fixed in Python 2.7's urllib.py. Thanks so much. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Lukas Wunner added the comment: Unfortunately this bug was only fixed in urllib2.py but never in urllib.py. This keeps biting people in the butt to this very day. Example: https://chromiumcodereview.appspot.com/10825107/ The attached patch remedies that and also fixes some more issues: (1) proxy_bypass handling: URLopener.open() will route the request to one of the open_*() methods based on the type of the *request* url. However, if a proxy is defined, it instead routes the request based on the type of the *proxy* url. So far so good. But: In open_http(), the code checks if proxy_bypass(realhost) is true and if so it modifies the Host header of the outgoing request. This code only works properly if the request url is by chance of type http. If the request url type is e.g. ftp and the proxy url type is http and there's a proxy_bypass defined for realhost, things will go awry since the program will try to speak HTTP with realhost while it should really speak FTP. (In other words, open_ftp() should be used instead of open_http(), the program is stuck in the wrong codepath.) Also, proxy_bypass handling is currently only implemented for the proxy url type http (and not, for instance, https). The patch solves this by moving the proxy_bypass check to URLopener.open(): If a proxy_bypass is defined for realhost, the request is routed based on the request url type and not based on the proxy url type. (2) addinfourl construction: Upon successful retrieval of the URL, open_http() and open_https() will construct an addinfourl object and return that to the caller. The object is constructed with hard coded url type http / https. So if for instance the request url type is ftp and the proxy url type is http, the addinfourl object will contain a url whose type will have magically changed from ftp to http. (3) Superfluous code: At the beginning of open_http() and open_https(), the program sets user_passwd = None. Directly below is an if-else statement. At the beginning of the else block the program again sets user_passwd = None. The patch also works with Python 2.6 save for set_tunnel() in httplib.py, which was called _set_tunnel() in 2.6. -- nosy: +l Added file: http://bugs.python.org/file31201/issue1424152-py27-urllib.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.2 -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil orsent...@gmail.com added the comment: Agreed to the suggestions made by Greg. The fix is now backported. For Py2.6 in the revision 74203. For Py3k in the revision 74204. Closing this issue. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Gregory P. Smith g...@krypto.org added the comment: *Rereads latest patch* I'm happy with this being backported as a bugfix to 3.1 and 2.6 so long as the set_tunnel method is hidden. Call it _set_tunnel() in the backport (and don't document its existence). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil orsent...@gmail.com added the comment: Fixed for 3.2 in py3k branch revision 74198. Asked python-dev for objections on back porting changes 2.6. Shall back port changes to py2.6 and py3.1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Senthil orsent...@gmail.com: -- resolution: - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
R. David Murray rdmur...@bitdance.com added the comment: Personally I would like to see that happen, but I think you should probably poll python-dev since it can be argued either way as to whether it is a bug fix or a new feature. FWIW, from the feeder bug reports it looks to me like the users perceive it as a bug. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
James Broadhead jamesbroadh...@gmail.com added the comment: +1 to the above. (imo, this is a bugfix, not a new feature) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Hans Lellelid h...@velum.net added the comment: Personally, I also think that this is a bugfix, though I realize that in order to fix the bug an API addition had to be made. So +1 from me on rolling into 2.6 (though my opinion is simply that of someone who's eager to see it fixed). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
R. David Murray rdmur...@bitdance.com added the comment: Note that this bug is also of concern to Ubuntu. See for example https://bugs.launchpad.net/python/+bug/94130. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil orsent...@gmail.com added the comment: This is actually fixed in Py2.7 and I am trying to get it Py3.2 before marking this as fixed. Based on the comments, should this be backported to Py2.6? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Jarek jarek@gmail.com added the comment: +1 for mercurial inoperability from behind proxy -- nosy: +jarek.jpa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Benjamin Peterson benja...@python.org added the comment: Senthil, are you still working on the 3.x version of the patch? -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil orsent...@gmail.com added the comment: Senthil, are you still working on the 3.x version of the patch? Sorry for the delay. I got to work on it. Shall start and shall try to get it in soon. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Craig McQueen ces-...@mcqueen.id.au added the comment: @gregory.p.smith: This change is not suitable for back porting as it arguably adds a new feature. Speaking as a Mercurial user who can't use Mercurial at work through a proxy firewall... I beg you to consider that fixing this is not really adding a new feature but fixing a broken implementation requirement. Surely proxy support is not optional for any serious HTTP library. -- nosy: +cmcqueen1975 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil orsent...@gmail.com added the comment: Craig McQueen comment: Speaking as a Mercurial user who can't use Mercurial at work through a proxy firewall... I beg you to consider that fixing this is not really We might have to take this up at python-dev. I shall do that to get other developers opinion on backporting this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Andrew Trick andrew.tr...@gmail.com added the comment: With this patch, I continued to get the following error SSL23_GET_SERVER_HELLO Until my coworker finally found a fix posted by Philippe Biondi: +++ b/mercurial/keepalive.py @@ -237,6 +237,8 @@ else: # no (working) free connections were found. Create a new one. h = http_class(host) +if hasattr(req,_tunnel_host) and req._tunnel_host: +h.set_tunnel(req._tunnel_host) if DEBUG: DEBUG.info(creating new connection to %s (%d), host, id(h)) self._cm.add(host, h, 0) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil orsent...@gmail.com added the comment: AndrewTrick: I am assuming your last comment is more relevant to mercurial's use of the set_tunnel, the facility provided by the patch, that is solving the issue for you. You had earlier pointed out mercurial's dependency upon this issue too. The fix as such stands good and may not require any change. Is my understanding OK? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Andrew Trick andrew.tr...@gmail.com added the comment: I should have pointed out that my secondary problem was a mercurial dependency on the urllib patch. I just wanted Mercurial users to get a complete fix. I figure they will be looking for a fix in the python bug report, and need to be told the fix won't work for them. On Mon, Jun 22, 2009 at 5:11 PM, Senthil rep...@bugs.python.org wrote: Senthil orsent...@gmail.com added the comment: AndrewTrick: I am assuming your last comment is more relevant to mercurial's use of the set_tunnel, the facility provided by the patch, that is solving the issue for you. You had earlier pointed out mercurial's dependency upon this issue too. The fix as such stands good and may not require any change. Is my understanding OK? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ -- Added file: http://bugs.python.org/file14339/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___I should have pointed out that my secondary problem was a mercurial dependency on the urllib patch. I just wanted Mercurial users to get a complete fix. I figure they will be looking for a fix in the python bug report, and need to be told the fix won#39;t work for them.br brdiv class=gmail_quoteOn Mon, Jun 22, 2009 at 5:11 PM, Senthil span dir=ltrlt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span wrote:brblockquote class=gmail_quote style=border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex; br Senthil lt;a href=mailto:orsent...@gmail.com;orsent...@gmail.com/agt; added the comment:br br AndrewTrick: I am assuming your last comment is more relevant tobr mercurial#39;s use of the set_tunnel, the facility provided by the patch,br that is solving the issue for you. You had earlier pointed outbr mercurial#39;s dependency upon this issue too.br br The fix as such stands good and may not require any change. Is mybr understanding OK?br divdiv/divdiv class=h5br --br br ___br Python tracker lt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;br lt;a href=http://bugs.python.org/issue1424152; target=_blankhttp://bugs.python.org/issue1424152/agt;br ___br /div/div/blockquote/divbr ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil orsent...@gmail.com added the comment: Fixed for Py2x in the revision 72880. Tested it on a Squid Proxy setup and found it working fine. Should this be backported? For Py3k, the Request class has undergone changes since the patch was developed, I am modifying the patch for Py3k to accommodate those changes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Gregory P. Smith g...@krypto.org added the comment: I added a versionadded: 2.7 note to the docs in r72890. This change is not suitable for back porting as it arguably adds a new feature. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
James Broadhead jamesbroadh...@gmail.com added the comment: Has there been any progress on this since January? It is causing/affecting: http://www.selenic.com/mercurial/bts/issue967 -- nosy: +jamesbroadhead ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Hans L h...@velum.net added the comment: These patches (well, the 2.6 patch) works for me. If there's something I can do to help get this accepted/applied, I'd be happy to do it. Obviously, I had no part in these patches, but I can take a stab at updating documentation or something if that is all that is needed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Facundo Batista facu...@taniquetil.com.ar added the comment: Hans, please take a look to my comment 79573 in this same bug. If you could do that, it'd be amazing... Thank you! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Hans Lellelid h...@velum.net added the comment: Sure -- I will tackle that this week; I hope I can come up with something satisfactory. As I have not provided doc patches before for Python I may need to spin up a bit on that (and of course on the exact meaning of the set_tunnel method in this context) -- but I'm happy to help! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil orsent...@gmail.com added the comment: Sorry for the delay. I know that patches work and I had tested them as well. I shall push those patches to trunk/p3k within this week. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil orsent...@gmail.com added the comment: Facundo Batista facu...@taniquetil.com.ar added the comment: Hans, please take a look to my comment 79573 in this same bug. If you could do that, it'd be amazing... Oops, had missed that one.. Shall update the patch, Facundo. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Gregory P. Smith g...@krypto.org added the comment: reassigning to the volunteer to get this in :) -- assignee: facundobatista - orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Alexander Solovyov pira...@piranha.org.ua: -- nosy: +piranha ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Hans L h...@velum.net: -- nosy: +hozn ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Elliot Murphy elliot.mur...@gmail.com: -- nosy: +statik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Daniel Diniz aja...@gmail.com: -- nosy: +jjlee stage: - test needed type: - feature request versions: -Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Daniel Diniz aja...@gmail.com: -- stage: test needed - patch review type: feature request - behavior versions: +Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Facundo Batista facu...@taniquetil.com.ar added the comment: Everything looks ok, with one detail, the new set_tunnel() function. Should this function be public? If yes, new documentation should be added. If not, it should start with _. I think that it should be public, because we're using it from somewhere else. So, please provide new patchs for documentation (don't bother to modify actual code patches). Thank you! ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Gregory P. Smith [EMAIL PROTECTED] added the comment: We need make sure this happens for 2.7/3.1. As its large enough to be a new feature it won't make it into 2.4/2.5/2.6/3.0. -- nosy: +gregory.p.smith priority: normal - high versions: +Python 2.7, Python 3.1 -Python 2.4 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil [EMAIL PROTECTED] added the comment: I agree, gregory. I had verified the fix and supplied patch for py2.6 and py3K. If those still apply to the trunk, I think we should go ahead, otherwise I shall come with the new patch for 2.7/3k. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by jan matejek [EMAIL PROTECTED]: -- nosy: +matejcik ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Christian Kassab [EMAIL PROTECTED] added the comment: Python 2.4.3 also doesn't support ssl and a proxy to be used at the same time in CentOS 5.1. This file addresses the issues. It has been tested by using YUM to access a repository through a proxy using ssl client certificates. YUM itself needed to be patched to allow for client certs to be used... that change is on its way upstream. Thanks to all the other guys here for supplying the first patches! -- nosy: +ckassab versions: +Python 2.4 Added file: http://bugs.python.org/file11454/issue1424152-py24.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil [EMAIL PROTECTED] added the comment: As indicated by other posters, this *IS A* serious issue with urllib2 as it does not do CONNECT for HTTPS through Proxy and it fails. chrisl, I verified your patch and it works properly. I made some minor changes (make a method private and changes w.r.t code in the trunk) and also added tests and NEWS to support its inclusion in the trunk. Facundo, we should try to include this in py26/py3k, I have attached the patch for both. There is a extra patch for test_urllib2net.py which tests real-time HTTPS connectivity taking the proxies from environment variables (HTTPS_PROXY). However, that has a serious dependency on Issue1251, which is still in Open state. When the bug Issue1251 is fixed, we can include the issue1424152-py26-test_urllib2net.diff separately. -- keywords: +patch Added file: http://bugs.python.org/file11332/issue1424152-py26.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Senthil [EMAIL PROTECTED]: -- components: +Library (Lib) -None versions: +Python 2.6, Python 3.0 Added file: http://bugs.python.org/file11333/issue1424152-py3k.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil [EMAIL PROTECTED] added the comment: Test issue1424152-py26-test_urllib2net.diff and issue1424152-py3k-test_urllib2net.diff patches has a dependency on Issue1251 for failure scenarios. Issue1251 deals with ssl module not support non-blocking handshakes. So, when the HTTPS environment is NOT SET, while HTTPS Proxy is used, this test will try to a do_handshake() in ssl module and will return as it wont get timed-out. This test case can be included after Issue1251 is fixed. Added file: http://bugs.python.org/file11334/issue1424152-py26-test_urllib2net.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Senthil [EMAIL PROTECTED]: Added file: http://bugs.python.org/file11335/issue1424152-py3k-test_urllib2net.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Jesús Cea Avión [EMAIL PROTECTED]: -- nosy: +jcea ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Andrew Trick [EMAIL PROTECTED] added the comment: Mercurial will not work for anyone in a large company without this fix. I appreciate the patch, but hope its released soon. I did try the patch with Mercurial, but now I'm getting different error. I'm not sure if its related to the same bug: abort: error: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol -- nosy: +AndrewTrick ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Martin Wilck [EMAIL PROTECTED] added the comment: I am not in my office. I'll be back on August 25, 2008. In urgent cases, please contact: Peter Pols [EMAIL PROTECTED] or Gerhard Wichert [EMAIL PROTECTED] Best regards Martin Wilck Added file: http://bugs.python.org/file3/unnamed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___meta http-equiv=Content-Type content=text/html; charset=utf-8div class=BodyFragment font size=2div class=PlainTextI am not in my office. I'll be back on August 25, 2008.br In urgent cases, please contact: br nbsp;nbsp; Peter Pols lt;[EMAIL PROTECTED]gt; orbr nbsp;nbsp; Gerhard Wichert lt;[EMAIL PROTECTED]gt;br br Best regardsbr Martin Wilck/div/font /div ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Antoine Pitrou [EMAIL PROTECTED]: ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Antoine Pitrou [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file3/unnamed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Senthil [EMAIL PROTECTED] added the comment: Senthil, could you handle this? Sure, I shall take this up, Facundo. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Facundo Batista [EMAIL PROTECTED]: ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Facundo Batista [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10632/unnamed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Facundo Batista [EMAIL PROTECTED] added the comment: I see that you're working on a final solution, this is great! What we would need also to incorporate this to the trunk is a patch for the test suite. Senthil, could you handle this? -- assignee: - facundobatista nosy: +facundobatista ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Nagy Ferenc László [EMAIL PROTECTED] added the comment: Can you please try this patch on top of the original patch? It makes an infinite loop: Traceback (most recent call last): File F:\nfl\proxyhttps\test.py, line 8, in module response = urllib2.urlopen(req) File C:\Python25\lib\urllib2.py, line 121, in urlopen return _opener.open(url, data) File C:\Python25\lib\urllib2.py, line 377, in open req = meth(req) File C:\Python25\lib\urllib2.py, line 1037, in do_request_ scheme, sel = splittype(request.get_selector()) File C:\Python25\lib\urllib2.py, line 253, in get_selector return self.__r_host File C:\Python25\lib\urllib2.py, line 215, in __getattr__ return getattr(self, attr) File C:\Python25\lib\urllib2.py, line 215, in __getattr__ return getattr(self, attr) File C:\Python25\lib\urllib2.py, line 215, in __getattr__ return getattr(self, attr) File C:\Python25\lib\urllib2.py, line 215, in __getattr__ return getattr(self, attr) File C:\Python25\lib\urllib2.py, line 215, in __getattr__ return getattr(self, attr) ... The test program was: import urllib2 targeturl = 'https://www.paypal.com/' proxyhost = 'proxy..hu:3128' req = urllib2.Request(targeturl) req.set_proxy(proxyhost, 'https') response = urllib2.urlopen(req) print response.info() ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Martijn Pieters [EMAIL PROTECTED] added the comment: I've created a python 2.4 compatible distribution of the python 2.5 urllib2 and httplib modules with the patch attached to this issue. This has proven especially useful in zc.buildout or other setuptools environments: http://pypi.python.org/pypi/httpsproxy_urllib2 -- nosy: +mjpieters ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Christopher Li [EMAIL PROTECTED] added the comment: Hi NL, Can you please try this patch on top of the original patch? Thanks Chris --- .pc/fix-up/urllib2.py 2008-02-06 01:13:10.0 -0800 +++ urllib2.py 2008-06-27 15:45:34.0 -0700 @@ -253,7 +253,7 @@ class Request: return self.__r_host def set_proxy(self, host, type): -if self.type == 'https' and not self._tunnel_host: +if self.get_type() == 'https' and not self._tunnel_host: self._tunnel_host = self.host else: self.type = type On Fri, Jun 27, 2008 at 3:22 PM, nfl [EMAIL PROTECTED] wrote: nfl [EMAIL PROTECTED] added the comment: Hi, looks like the attached patch only works if I use urllib2.ProxyHandler({'https' : proxy}) at the start, but not when I use request.set_proxy(proxy, 'https') per request. I tested with Python 2.5.1 on Win32. -- nosy: +nfl ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Mathias Behrle [EMAIL PROTECTED] added the comment: Just supporting, that proxy support over https is widely used and important. I am wondering, why this request is open for more than 2 years. Mathias -- nosy: +matb ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Martin Wilck [EMAIL PROTECTED] added the comment: I am not in my office. I'll be back on June 30, 2008. In urgent cases, please contact: Peter Pols [EMAIL PROTECTED] or Gerhard Wichert [EMAIL PROTECTED] Best regards Martin Wilck Added file: http://bugs.python.org/file10632/unnamed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 ___meta http-equiv=Content-Type content=text/html; charset=utf-8div class=BodyFragment font size=2div class=PlainTextI am not in my office. I'll be back on June 30, 2008.br In urgent cases, please contact:nbsp; br nbsp; Peter Pols lt;[EMAIL PROTECTED]gt; orbr nbsp;nbsp; Gerhard Wichert lt;[EMAIL PROTECTED]gt;br br Best regardsbr Martin Wilckbr /div/font /div ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Cameron Simpson [EMAIL PROTECTED] added the comment: Well I've happily done lots of SOAP transations, admittedly all to the same webservice, via HTTPS-over-proxy-CONNECT using ChrisL's patch. It seems to work just fine. Whom do we petition to get this into the mainline python sources? - Cameron _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Cameron Simpson [EMAIL PROTECTED]: -- nosy: +cameron _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Cameron Simpson [EMAIL PROTECTED] added the comment: Chris, I'm trying your patch out now. My quick reading of it looks ok. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Peter Poeml [EMAIL PROTECTED]: -- nosy: +poeml _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Dave Peterson [EMAIL PROTECTED]: -- nosy: +dpeterson _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Christopher Li [EMAIL PROTECTED] added the comment: In cast it is not obvious. I already attached the purpose patch http-tunnel-urllib in the bug. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by Chris Morgan [EMAIL PROTECTED]: -- nosy: +mihalis68 _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Christopher Li [EMAIL PROTECTED] added the comment: Hi, I am working on a patch to implement the https proxy support for urllib2. It works fine for me, but feel free to change the patch. Can any one take a look please? Thanks -- nosy: +chrisl Added file: http://bugs.python.org/file9753/http-tunnel-urllib _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Martin Wilck added the comment: The recipe in its current form doesn't work with urllib2 in python 2.5 The reason it fails is that the HTTPConnection.request() method isn't passed the request itself (with the proxy host and port info). No easy solution to be seen. -- nosy: +mwilck _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails
Changes by vila: -- nosy: +vila _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1424152 _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com