/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 bzrlib/transport/http/_urllib.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-12-20 20:33:46 UTC
  • mfrom: (3134.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20071220203346-toifx0pb5987jcqo
(vila) Fix bug #177643 by handling credentials embedded in urls works
        again for pycurl

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
        else:
50
50
            self._opener = self._opener_class()
51
51
 
52
 
    def _remote_path(self, relpath):
53
 
        """Produce absolute path, adjusting protocol."""
54
 
        relative = urlutils.unescape(relpath).encode('utf-8')
55
 
        path = self._combine_paths(self._path, relative)
56
 
        # urllib2 will be confused if it find authentication
57
 
        # info (user, password) in the urls. So we handle them separatly.
58
 
 
59
 
        # rhaaaa ! confused where ? confused when ? --vila 20070922
60
 
        return self._unsplit_url(self._unqualified_scheme,
61
 
                                 None, None, self._host, self._port, path)
62
 
 
63
52
    def _perform(self, request):
64
53
        """Send the request to the server and handles common errors.
65
54
 
74
63
            # request couldn't do it
75
64
            connection.cleanup_pipe()
76
65
        else:
77
 
            # First request, intialize credentials.
 
66
            # First request, initialize credentials.
78
67
            # scheme and realm will be set by the _urllib2_wrappers.AuthHandler
79
 
            user = self._user
80
 
            password = self._password
81
 
            auth = dict(host=self._host, port=self._port,
82
 
                        user=user, password=password,
83
 
                        protocol=self._unqualified_scheme,
84
 
                        path=self._path)
85
 
            # Proxy initialization will be done by first proxied request
 
68
            auth = self._create_auth()
 
69
            # Proxy initialization will be done by the first proxied request
86
70
            proxy_auth = dict()
87
71
        # Ensure authentication info is provided
88
72
        request.auth = auth