Rev 2553: Mark the most obvious places that need to be fixed as a reminder. in file:///v/home/vila/src/bugs/122258/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Wed Jun 27 16:21:23 BST 2007
At file:///v/home/vila/src/bugs/122258/
------------------------------------------------------------
revno: 2553
revision-id: v.ladeuil+lp at free.fr-20070627152121-93yzguq5clkb7a9i
parent: pqm at pqm.ubuntu.com-20070626061722-8m49gdqd8cb8zc0c
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 122258
timestamp: Wed 2007-06-27 17:21:21 +0200
message:
Mark the most obvious places that need to be fixed as a reminder.
modified:
bzrlib/transport/__init__.py transport.py-20050711165921-4978aa7ce1285ad5
bzrlib/transport/http/__init__.py http_transport.py-20050711212304-506c5fd1059ace96
bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
-------------- next part --------------
=== modified file 'bzrlib/transport/__init__.py'
--- a/bzrlib/transport/__init__.py 2007-05-08 20:00:50 +0000
+++ b/bzrlib/transport/__init__.py 2007-06-27 15:21:21 +0000
@@ -173,6 +173,7 @@
# TODO: jam 20060606 urls should only be ascii, or they should raise InvalidURL
if isinstance(url, unicode):
url = url.encode('utf-8')
+ # FIXME: urlparse can't grok http+[pycurl|urllib] and returns empty netloc
(scheme, netloc, path, params,
query, fragment) = urlparse.urlparse(url, allow_fragments=False)
username = password = host = port = None
=== modified file 'bzrlib/transport/http/__init__.py'
--- a/bzrlib/transport/http/__init__.py 2007-05-06 06:59:57 +0000
+++ b/bzrlib/transport/http/__init__.py 2007-06-27 15:21:21 +0000
@@ -45,6 +45,7 @@
"""
assert re.match(r'^(https?)(\+\w+)?://', url), \
'invalid absolute url %r' % url
+ # FIXME: urlsplit can't grok http+[pycurl|urllib] and returns empty netloc
scheme, netloc, path, query, fragment = urlparse.urlsplit(url)
if '@' in netloc:
@@ -138,6 +139,11 @@
if base[-1] != '/':
base = base + '/'
super(HttpTransportBase, self).__init__(base)
+ # FIXME: urlparse calls urlsplit which can't grok http+[pycurl|urllib]
+ # and returns empty netloc (self._host below) and leave the netloc in
+ # path. As we use only apparent_proto here, this is a minor
+ # problem. Otherwise we concatenate _host and _path which explain why
+ # this has not been detected earlier.
(apparent_proto, self._host,
self._path, self._parameters,
self._query, self._fragment) = urlparse.urlparse(self.base)
=== modified file 'bzrlib/transport/http/_urllib2_wrappers.py'
--- a/bzrlib/transport/http/_urllib2_wrappers.py 2007-06-24 15:16:40 +0000
+++ b/bzrlib/transport/http/_urllib2_wrappers.py 2007-06-27 15:21:21 +0000
@@ -180,6 +180,7 @@
Get user and password from url of the form: http://user:pass@host/path
:returns: (clean_url, user, password)
"""
+ # FIXME: urlsplit can't grok http+[pycurl|urllib] and returns empty netloc
scheme, netloc, path, query, fragment = urlparse.urlsplit(url)
if '@' in netloc:
@@ -209,6 +210,7 @@
users for different paths for the same realm should be done
at a higher level.
"""
+ # FIXME: urlsplit can't grok http+[pycurl|urllib] and returns empty netloc
scheme, host, path, query, fragment = urlparse.urlsplit(url)
return '%s://%s' % (scheme, host)
More information about the bazaar-commits
mailing list