summaryrefslogtreecommitdiff
path: root/Lib/urlparse.py
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-12-17 04:56:02 +0000
committerSenthil Kumaran <orsenthil@gmail.com>2010-12-17 04:56:02 +0000
commit5c7fd6eefa457457f6f19e4397a79de5627af32e (patch)
treeb172f2cae3162594127f81689c81d79ec477b859 /Lib/urlparse.py
parent3e8cd62d0342d819157ddab7c36b0eee4018ab95 (diff)
downloadcpython-git-5c7fd6eefa457457f6f19e4397a79de5627af32e.tar.gz
Merged revisions 87329 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87329 | senthil.kumaran | 2010-12-17 12:48:45 +0800 (Fri, 17 Dec 2010) | 3 lines Fix Issue9721 - urljoin behavior when the relative url starts with ';' ........
Diffstat (limited to 'Lib/urlparse.py')
-rw-r--r--Lib/urlparse.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/urlparse.py b/Lib/urlparse.py
index 4ac9867331..a019a7b7a4 100644
--- a/Lib/urlparse.py
+++ b/Lib/urlparse.py
@@ -256,14 +256,9 @@ def urljoin(base, url, allow_fragments=True):
if path[:1] == '/':
return urlunparse((scheme, netloc, path,
params, query, fragment))
- if not path:
+ if not path and not params:
path = bpath
- if not params:
- params = bparams
- else:
- path = path[:-1]
- return urlunparse((scheme, netloc, path,
- params, query, fragment))
+ params = bparams
if not query:
query = bquery
return urlunparse((scheme, netloc, path,