https over proxy and other stuff ;)

Chris Li hg at chrisli.org
Wed Feb 6 15:42:37 CST 2008


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: http-tunnel-urllib
Type: application/octet-stream
Size: 4087 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20080206/5dbba129/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: http-tunnel-mercurial
Type: application/octet-stream
Size: 677 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial/attachments/20080206/5dbba129/attachment-0001.obj 


More information about the Mercurial mailing list