do not lose query string for whole URL replacement (#4643)
This commit is contained in:
parent
2731bda86c
commit
bfd0f63020
|
@ -75,3 +75,7 @@ def test_url_server_even_more():
|
|||
def test_url_server_even_more_more():
|
||||
assert get_variadic_url('[url]/foobar/baz/json?foo=bar',
|
||||
{'url': 'http://www.example.net'}) == 'http://www.example.net/foobar/baz/json?foo=bar'
|
||||
|
||||
def test_url_whole_with_qs():
|
||||
assert get_variadic_url('[url]',
|
||||
{'url': 'http://www.example.net/?foo=bar'}) == 'http://www.example.net/?foo=bar'
|
||||
|
|
|
@ -468,7 +468,7 @@ def get_variadic_url(url, variables, encode_query=True):
|
|||
p2 = urlparse.urlsplit(before_path)
|
||||
scheme, netloc = p2.scheme, p2.netloc
|
||||
if p2.path and not path:
|
||||
path = p2.path
|
||||
path, query = p2.path, p2.query
|
||||
if path:
|
||||
path = quote(ezt_substitute(path, variables))
|
||||
if fragment and '[' in fragment:
|
||||
|
|
Loading…
Reference in New Issue