~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-18 15:43:47 UTC
  • mto: This revision was merged to the branch mainline in revision 6383.
  • Revision ID: jelmer@samba.org-20111218154347-d42sxp2qzn36uo2r
Add urlutils.quote / urlutils.unquote.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from cStringIO import StringIO
23
23
import re
24
24
import urlparse
25
 
import urllib
26
25
import sys
27
26
import weakref
28
27
 
63
62
            host = netloc.split(':', 1)[0]
64
63
        else:
65
64
            host = netloc
66
 
        username = urllib.unquote(username)
 
65
        username = urlutils.unquote(username)
67
66
        if password is not None:
68
 
            password = urllib.unquote(password)
 
67
            password = urlutils.unquote(password)
69
68
        else:
70
69
            password = ui.ui_factory.get_password(
71
70
                prompt=u'HTTP %(user)s@%(host)s password',
589
588
        if transport_base.startswith('bzr+'):
590
589
            transport_base = transport_base[4:]
591
590
        rel_url = urlutils.relative_url(self.base, transport_base)
592
 
        return urllib.unquote(rel_url)
 
591
        return urlutils.unquote(rel_url)
593
592
 
594
593
    def send_http_smart_request(self, bytes):
595
594
        try: