/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/git/remote.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-02-14 19:32:00 UTC
  • mfrom: (7268.10.4 git-http-username)
  • Revision ID: breezy.the.bot@gmail.com-20190214193200-l4f05nzr408mv5qw
Strip username from URLs before passing them to httplib.

This fixes access to Git HTTP repositories with authentication, such as bitbucket.

Merged from https://code.launchpad.net/~jelmer/brz/git-http-username/+merge/363182

Show diffs side-by-side

added added

removed removed

Lines of Context:
660
660
 
661
661
    def __init__(self, transport, *args, **kwargs):
662
662
        self.transport = transport
663
 
        super(BzrGitHttpClient, self).__init__(
664
 
            transport.external_url(), *args, **kwargs)
 
663
        url = urlutils.URL.from_string(transport.external_url())
 
664
        url.user = url.quoted_user = None
 
665
        url.password = url.quoted_password = None
 
666
        super(BzrGitHttpClient, self).__init__(str(url), *args, **kwargs)
665
667
 
666
668
    def _http_request(self, url, headers=None, data=None,
667
669
                      allow_compression=False):