~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/remote.py

  • Committer: Andrew Bennetts
  • Date: 2007-04-27 02:19:11 UTC
  • mto: This revision was merged to the branch mainline in revision 2469.
  • Revision ID: andrew.bennetts@canonical.com-20070427021911-pk1ylmrmc1ueo9ad
Normalise URLs in RemoteHTTPTransport before doing URL calculations to fix bad results.

Show diffs side-by-side

added added

removed removed

Lines of Context:
488
488
        """After connecting HTTP Transport only deals in relative URLs."""
489
489
        # Adjust the relpath based on which URL this smart transport is
490
490
        # connected to.
491
 
        base = self._http_transport.base
 
491
        base = urlutils.normalize_url(self._http_transport.base)
492
492
        url = urlutils.join(self.base[len('bzr+'):], relpath)
493
493
        url = urlutils.normalize_url(url)
494
494
        return urlutils.relative_url(base, url)
523
523
        # We either use the exact same http_transport (for child locations), or
524
524
        # a clone of the underlying http_transport (for parent locations).  This
525
525
        # means we share the connection.
526
 
        normalized_rel_url = urlutils.relative_url(self.base, abs_url)
 
526
        norm_base = urlutils.normalize_url(self.base)
 
527
        norm_abs_url = urlutils.normalize_url(abs_url)
 
528
        normalized_rel_url = urlutils.relative_url(norm_base, norm_abs_url)
527
529
        if normalized_rel_url == ".." or normalized_rel_url.startswith("../"):
528
530
            http_transport = self._http_transport.clone(normalized_rel_url)
529
531
        else: