summaryrefslogtreecommitdiffstats
path: root/Lib/urllib
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-12-17 04:48:45 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2010-12-17 04:48:45 (GMT)
commitdca5b862338034460e060cedee8ba788073e20b3 (patch)
treed8ddee086be76d1b11fb371a778d518a842b0d55 /Lib/urllib
parentb25a791802a1915097e02bfba04e27a41ae55ebf (diff)
downloadcpython-dca5b862338034460e060cedee8ba788073e20b3.zip
cpython-dca5b862338034460e060cedee8ba788073e20b3.tar.gz
cpython-dca5b862338034460e060cedee8ba788073e20b3.tar.bz2
Fix Issue9721 - urljoin behavior when the relative url starts with ';'
Diffstat (limited to 'Lib/urllib')
-rw-r--r--Lib/urllib/parse.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
index eedd071..42f8193 100644
--- a/Lib/urllib/parse.py
+++ b/Lib/urllib/parse.py
@@ -411,14 +411,9 @@ def urljoin(base, url, allow_fragments=True):
if path[:1] == '/':
return _coerce_result(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 _coerce_result(urlunparse((scheme, netloc, path,
- params, query, fragment)))
+ params = bparams
if not query:
query = bquery
return _coerce_result(urlunparse((scheme, netloc, path,