mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Issue #23703: Fix a regression in urljoin() introduced in 901e4e52b20a.
Patch by Demian Brecht.
This commit is contained in:
parent
d2bc389e55
commit
20416f7994
3 changed files with 7 additions and 2 deletions
|
@ -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 = []
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue