See rev. 1.42 for log message

This commit is contained in:
Brett Cannon 2003-10-12 04:29:10 +00:00
parent 82860df417
commit 8da2a52dd6

View file

@ -157,13 +157,9 @@ def urljoin(base, url, allow_fragments = 1):
if path[:1] == '/': if path[:1] == '/':
return urlunparse((scheme, netloc, path, return urlunparse((scheme, netloc, path,
params, query, fragment)) params, query, fragment))
if not path: if not (path or params or query):
if not params:
params = bparams
if not query:
query = bquery
return urlunparse((scheme, netloc, bpath, return urlunparse((scheme, netloc, bpath,
params, query, fragment)) bparams, bquery, fragment))
segments = bpath.split('/')[:-1] + path.split('/') segments = bpath.split('/')[:-1] + path.split('/')
# XXX The stuff below is bogus in various ways... # XXX The stuff below is bogus in various ways...
if segments[-1] == '.': if segments[-1] == '.':