proxy tests fail with newer versions of pycurl

Bug #1645017 reported by Jelmer Vernooij on 2016-11-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Vincent Ladeuil

Bug Description

All ProxyAuth tests fail with newer versions of pycurl:

ERROR: bzrlib.tests.test_http.TestProxyAuth.test_user_pass(pycurl,HTTP/1.0,proxy-basicdigest)
Traceback (most recent call last):
testtools.testresult.real._StringException: log: {{{1200.503 got pycurl error: 7, Unsupported proxy scheme for 'http+pycurl://joe:foo@', (7, "Unsupported proxy scheme for 'http+pycurl://joe:foo@'"), url:}}}

Traceback (most recent call last):
  File "/home/jelmer/src/bzr/build-area/bzr-2.7.0+bzr6619/build/lib.linux-x86_64-2.7/bzrlib/tests/", line 1673, in test_user_pass
    self.assertEqual('contents of a\n', t.get('a').read())
  File "/home/jelmer/src/bzr/build-area/bzr-2.7.0+bzr6619/build/lib.linux-x86_64-2.7/bzrlib/transport/http/", line 86, in get
    code, response_file = self._get(relpath, None)
  File "/home/jelmer/src/bzr/build-area/bzr-2.7.0+bzr6619/build/lib.linux-x86_64-2.7/bzrlib/transport/http/", line 173, in _get
    return self._get_full(relpath)
  File "/home/jelmer/src/bzr/build-area/bzr-2.7.0+bzr6619/build/lib.linux-x86_64-2.7/bzrlib/transport/http/", line 208, in _get_full
    self._curl_perform(curl, header)
  File "/home/jelmer/src/bzr/build-area/bzr-2.7.0+bzr6619/build/lib.linux-x86_64-2.7/bzrlib/transport/http/", line 405, in _curl_perform
    'curl connection error (%s)\non %s' % (e[1], url))
bzrlib.errors.ConnectionError: Connection error: curl connection error (Unsupported proxy scheme for 'http+pycurl://joe:foo@')

This is because PyCURL is more strict about the scheme in proxy URLs now. See

Related branches

Jelmer Vernooij (jelmer) wrote :

This is caused by bzrlib.tests.test_http setting the 'all_proxy' environment variable to a URL that starts with 'http+pycurl://'... pycurl then just looks in the environment for the proxy variable.

We should sanitize the value of this environment variable before setting it in the environment.

Vincent Ladeuil (vila) on 2016-11-26
Changed in bzr:
assignee: nobody → Vincent Ladeuil (vila)
importance: Undecided → High
status: New → Confirmed
Vincent Ladeuil (vila) wrote :

This is a test-only issue and I have a patch to fix all the 44 errors.

Will propose a branch asap.

Vincent Ladeuil (vila) on 2016-11-26
Changed in bzr:
status: Confirmed → In Progress
Vincent Ladeuil (vila) wrote :

Branch proposed (for an outrageous asap value :-}).

Vincent Ladeuil (vila) on 2017-01-16
Changed in bzr:
milestone: none → 2.7.1
Vincent Ladeuil (vila) on 2017-01-16
Changed in bzr:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers