=== modified file 'bzrlib/tests/test_http.py'
--- bzrlib/tests/test_http.py 2016-02-01 18:06:32 +0000
+++ bzrlib/tests/test_http.py 2016-11-26 18:07:08 +0000
@@ -1273,6 +1273,8 @@
self.no_proxy_host = self.server_host_port
# The secondary server is the proxy
self.proxy_url = self.get_secondary_url()
+ if self._testing_pycurl():
+ self.proxy_url = self.proxy_url.replace('+pycurl', '')
def _testing_pycurl(self):
# TODO: This is duplicated for lots of the classes in this file
@@ -1853,7 +1855,10 @@
])
def get_user_transport(self, user, password):
- self.overrideEnv('all_proxy', self.get_user_url(user, password))
+ proxy_url = self.get_user_url(user, password)
+ if self._testing_pycurl():
+ proxy_url = proxy_url.replace('+pycurl', '')
+ self.overrideEnv('all_proxy', proxy_url)
return TestAuth.get_user_transport(self, user, password)
def test_empty_pass(self):
=== modified file 'bzrlib/transport/http/_pycurl.py'
--- bzrlib/transport/http/_pycurl.py 2011-12-19 13:23:58 +0000
+++ bzrlib/transport/http/_pycurl.py 2016-11-26 18:10:48 +0000
@@ -85,6 +85,9 @@
"""
return pycurl.__dict__.get(symbol, default)
+# Yes, weird but returned on weird http error (invalid status line)
+CURLE_FTP_WEIRD_SERVER_REPLY = _get_pycurl_errcode(
+ 'E_FTP_WEIRD_SERVER_REPLY', 8)
CURLE_COULDNT_CONNECT = _get_pycurl_errcode('E_COULDNT_CONNECT', 7)
CURLE_COULDNT_RESOLVE_HOST = _get_pycurl_errcode('E_COULDNT_RESOLVE_HOST', 6)
CURLE_COULDNT_RESOLVE_PROXY = _get_pycurl_errcode('E_COULDNT_RESOLVE_PROXY', 5)
@@ -397,6 +400,7 @@
if e[0] in (CURLE_COULDNT_RESOLVE_HOST,
CURLE_COULDNT_RESOLVE_PROXY,
CURLE_COULDNT_CONNECT,
+ CURLE_FTP_WEIRD_SERVER_REPLY,
CURLE_GOT_NOTHING,
CURLE_SSL_CACERT,
CURLE_SSL_CACERT_BADFILE,