~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 2298.7.1.

  • Committer: Vincent Ladeuil
  • Date: 2007-02-25 12:10:53 UTC
  • mto: (2314.1.1 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 2315.
  • Revision ID: v.ladeuil+lp@free.fr-20070225121053-eh4u4ydukn97ht9q
Fix bug #87765: proxy env variables without scheme should cause
bzr to issue traceback.

* bzrlib/tests/test_http.py:
(TestHttpProxyWhiteBox.test_invalid_proxy): New test for an proxy
not mentionning a scheme.
(TestProxyHttpServer.setUp): New attribute with the proxy raw
address.
(TestProxyHttpServer.test_http_proxy_without_scheme): New test
checking that InvalidURL is raised when an env variable specifies
no scheme.
(TestProxyHttpServer_pycurl): pycurl ignores invalid proxies,
check it in case it changes in the future.

* bzrlib/transport/http/_urllib2_wrappers.py:
(ProxyHandler.set_proxy): If we can't find a host in the proxy env
variable, raises InvalidURL.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: