https over proxy and other stuff ;)

Chris Morgan mihalis68 at gmail.com
Thu Mar 13 10:21:16 CDT 2008


FWIW I just tried to find the status of the underlying problem with
Python/urllib2 and unfortunately this does appear to be still
outstanding without any progress. Nevertheless I did at least find a
fairly definitive link (as it appears to me) about this :

http://bugs.python.org/issue1424152

Took me a while because the first few hits turned up older discussion
of the issue on ActiveState.com or (now-private) sourceforge.net pages

Do you think it would be helpful to post the urllib2 patch over there
for their scrutiny?

I'm not a Python programmer, however I find in my own work the easiest
way to get the expert to write the good code is to post some
(potentially) bad code ASAP!

Cheers

Chris

On Wed, Mar 12, 2008 at 6:05 PM, Matt Mackall <mpm at selenic.com> wrote:
>
>  On Wed, 2008-03-12 at 17:17 -0400, Chris Morgan wrote:
>  > Hi,
>  >   Is the fix for Hg+https+strict web proxy[1]going to be in 1.0?
>
>  It's sitting in my inbox waiting for me to have some time to look at it
>  more closely. I'd been hoping someone smarter would get to it before me.
>  The need to patch Python's bits is obviously quite problematic. Perhaps
>  there's some way we can use a private superclass to avoid that. Adding
>  Chris Li back to the cc:.
>
>
>
>  > Sorry if the answer is obvious to some, it's not to me.
>  >
>  > Thanks
>  >
>  > Chris
>  >
>  > [1] details below, but briefly, using https URLs to access a mercurial
>  > repository via a strict web proxy doesn't work, because strictly
>  > speaking the command sent should be CONNECT, not GET when it's an SSL
>  > connection. The email quoted back below provided the first fix for
>  > this, but I'm not aware that it was accepted
>  >
>  >
>  >
>  >
>  > 2008/2/6 Chris Li <hg at chrisli.org>:
>  > > On Jan 10, 2008 10:46 AM, Matt Mackall <mpm at selenic.com> wrote:
>  > >
>  > >  > > we tried connection to mercurial via proxy and https. Client connects to proxy
>  > >  > > connection through GET (not connect) so it doesn't work.
>  > >  >
>  > >  > Probably fixable:
>  > >  >
>  > >  >  http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/456195
>  > >  >
>  > >  > Care to take a stab at it?
>  > >
>  > >  I did take a stab at it. I have one patch for urllib2 and one patch
>  > >  for mercurial.
>  > >  After I apply both I can get mercurial to push over proxy in https.
>  > >
>  > >  I think it is possible to merge the urllib2 patch into mercurial patch as well.
>  > >  keepalive.py has a lot of duplicate of of the urllib2. The proxy_open part
>  > >  of the fix is ugly to integrate to httprepro.py because it is in the middle
>  > >  of the proxy_open function. We have to duplicate the whole proxy_open
>  > >  for it.
>  > >
>  > >  BTW, the reason we need the proxy_open fix is that, http tunnel does not
>  > >  change the request type.  It happens on the socket connection level.
>  > >  It should be transparent to the request once the tunnel is established.
>  > >
>  > >  Chris
>  > >
>  > > _______________________________________________
>  > >  Mercurial mailing list
>  > >  Mercurial at selenic.com
>  > >  http://selenic.com/mailman/listinfo/mercurial
>  > >
>  > >
>  >
>  >
>
>  --
>
>
> Mathematics is the supreme nostalgia of our time.
>
>



-- 
test sig


More information about the Mercurial mailing list