Commit Graph

29 Commits

Author SHA1 Message Date
Benoit Allard
5c44ed9439 url: expand path in auth filenames 2010-03-26 21:37:18 +01:00
Martin Geisler
b7c229f7fa url: only mark format string for translation 2010-02-24 17:11:37 +01:00
Patrick Mezard
297d72a71e url: avoid traceback when parsing [auth] (issue2056) 2010-02-23 22:31:54 +01:00
Benoit Boissinot
3e6397360c url: *args argument is a tuple, not a list (found by pylint)
E1101:514:httpshandler._makeconnection: Instance of 'tuple' has no 'pop' member
E1101:516:httpshandler._makeconnection: Instance of 'tuple' has no 'pop' member
2010-02-19 02:51:35 +01:00
Benoit Boissinot
a92c59721b url: correctly quote '/' in user and password embedded in urls 2010-02-15 22:39:36 +01:00
Benoit Boissinot
0a475e9eff url: fix python < 2.6 with ssl installed
_GLOBAL_DEFAULT_TIMEOUT isn't related to ssl, but to python < 2.6, move it to
the right hunk.
2010-02-15 18:12:50 +01:00
Benoit Boissinot
b500e0f9b2 url: proxy handling, simplify and correctly deal with IPv6
Thanks to Henrik for testing.
2010-02-11 20:42:20 +01:00
Matt Mackall
fac557c194 ssl: fix compatibility with pre-2.6 Python 2010-02-10 17:42:57 -06:00
Henrik Stuart
2d2f851cb8 url: SSL server certificate verification using web.cacerts file (issue1174) 2010-02-10 20:27:46 +01:00
Benoit Boissinot
7f48909ac5 url: httplib.HTTPSConnection already handles IPv6 and port parsing fine 2010-02-10 20:08:18 +01:00
Matt Mackall
8d99be19f0 many, many trivial check-code fixups 2010-01-25 00:05:27 -06:00
Matt Mackall
595d66f424 Update license to GPLv2+ 2010-01-19 22:20:08 -06:00
Henrik Stuart
f5163bdcf6 url: generalise HTTPS proxy handling to accomodate Python changes
Python 2.6.3 introduced HTTPS proxy tunnelling in a way that interferes with
the way HTTPS proxying is handled in Mercurial. This fix generalises it to work
on Python 2.4 to 2.6.
2009-11-13 06:29:49 +01:00
Augie Fackler
c66ce37035 keepalive: handle broken pipes gracefully during large POSTs 2009-11-02 11:03:22 -05:00
Martin Geisler
9f1896c083 do not attempt to translate ui.debug output 2009-09-19 01:15:38 +02:00
Henrik Stuart
53551a6626 url: add support for custom handlers in extensions 2009-08-11 22:45:38 +02:00
Wagner Bruna
1dc5d9c774 url: fix use of non-int port in https connections via proxy
Complements aaf0c304ea93 (issue1725).
2009-07-14 17:12:12 -03:00
Henrik Stuart
6360c8356c url: fix use of non-int port in https connections (issue1725)
Versions of Python before 2.6 cannot automatically convert a given
port number to an integer, so we add a conversion to coerce the given
input to an int.
2009-07-08 18:35:13 +02:00
Henrik Stuart
eb1e0babd5 url: let host port take precedence when connecting to HTTPS
Fixes use of HTTPS connections on non-standard ports.
2009-06-20 17:09:49 +02:00
Henrik Stuart
972f154635 url: support client certificate files over HTTPS (issue643)
This extends the httpshandler with the means to utilise the auth
section to provide it with a PEM encoded certificate key file and
certificate chain file. This works also with sites that both require
client certificate authentication and basic or digest password
authentication, although the latter situation may require the user to
enter the PEM password multiple times.
2009-06-20 10:58:57 +02:00
Henrik Stuart
a79a5a1a15 url: use CONNECT for HTTPS connections through HTTP proxy (issue967)
urllib2 and httplib does not support using CONNECT proxy requests, but
only regular requests over the proxy. This does not work with HTTPS
requests as they typically require that the client issues a CONNECT to
the proxy to give a direct connection to the remote HTTPS server.

This is solved by duplicating some of the httplib functionality and
tying it together with the keepalive library such that a HTTPS
connection that need to be proxied can be proxied by letting a
connection be established to the proxy server and then subsequently
performing the normal request to the specified server through the
proxy server.

As it stands, the code also purports to support HTTPS proxies, i.e.
proxies that you connect to using SSL. These are extremely rare and
nothing is done to ensure that CONNECT requests can be made to these
as that would require multiple SSL handshakes. This use case is also
not supported by most other contemporary web tools like curl and
Firefox3.
2009-05-22 08:56:43 +02:00
Sune Foldager
3b6f32dcc9 url: fix bug in passwordmgr related to auth configuration
Usernames given as part of the URL would be ignored.
This bug was introduced in ff71c1e17a2ae6bd42d85685b412005cc1340c33
2009-05-11 07:55:13 +02:00
Sune Foldager
4a665141b4 allow http authentication information to be specified in the configuration 2009-05-04 20:26:27 +02:00
Martin Geisler
750183bdad updated license to be explicit about GPL version 2 2009-04-26 01:08:54 +02:00
Matt Mackall
c15de6b1b7 ui: make interactive a method 2009-04-26 16:50:44 -05:00
Martin Geisler
1deb417a82 util: use built-in set and frozenset
This drops Python 2.3 compatibility.
2009-04-22 00:55:32 +02:00
Patrick Mezard
1c11cefeaf url: detect scheme with a regexp instead of urlsplit()
The latter says 'c' is a scheme in 'c:\foo\bar'
2008-10-28 23:54:01 +01:00
Patrick Mezard
b5e6153e70 url: fix file:// URL handling 2008-10-28 22:24:41 +01:00
Benoit Boissinot
214af7ec3c factor out the url handling from httprepo
Create url.py to handle all the url handling:
- proxy handling
- workaround various python bugs
- handle username/password embedded in the url
2008-10-27 21:50:01 +01:00