proxy tests fail with newer versions of pycurl

Bug #1645017 reported by Jelmer Vernooij
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
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@127.0.0.1:34091/', (7, "Unsupported proxy scheme for 'http+pycurl://joe:foo@127.0.0.1:34091/'"), url: http://127.0.0.1:34091/a}}}

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/test_http.py", 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/__init__.py", 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/_pycurl.py", 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/_pycurl.py", 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/_pycurl.py", 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@127.0.0.1:34091/')
on http://127.0.0.1:34091/a

This is because PyCURL is more strict about the scheme in proxy URLs now. See https://github.com/curl/curl/issues/1015

Related branches

Revision history for this message
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)
Changed in bzr:
assignee: nobody → Vincent Ladeuil (vila)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
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)
Changed in bzr:
status: Confirmed → In Progress
Revision history for this message
Vincent Ladeuil (vila) wrote :

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

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.