Issue #23703: Fix a regression in urljoin() introduced in 901e4e52b20a.

Patch by Demian Brecht.
This commit is contained in:
Berker Peksag 2015-04-16 02:31:14 +03:00
parent d2bc389e55
commit 20416f7994
3 changed files with 7 additions and 2 deletions

View file

@ -447,8 +447,7 @@ def urljoin(base, url, allow_fragments=True):
segments = base_parts + path.split('/')
# filter out elements that would cause redundant slashes on re-joining
# the resolved_path
segments = segments[0:1] + [
s for s in segments[1:-1] if len(s) > 0] + segments[-1:]
segments[1:-1] = filter(None, segments[1:-1])
resolved_path = []