Service URL: keep blank GET arguments
When a service URL contains GET arguments with no associated value, eg http://example.com/?foo=a&bar only the arguments with value are kept, yielding http://example.com/?foo=a&ticket=<TICKET> losing `bar` in the process
This commit is contained in:
parent
9cd44aa8aa
commit
b7c7c0f0ba
1 changed files with 1 additions and 1 deletions
|
@ -259,7 +259,7 @@ def update_url(url, params):
|
||||||
value = value.encode('utf-8')
|
value = value.encode('utf-8')
|
||||||
params[key] = value
|
params[key] = value
|
||||||
url_parts = list(urlparse(url))
|
url_parts = list(urlparse(url))
|
||||||
query = dict(parse_qsl(url_parts[4]))
|
query = dict(parse_qsl(url_parts[4], keep_blank_values=True))
|
||||||
query.update(params)
|
query.update(params)
|
||||||
# make the params order deterministic
|
# make the params order deterministic
|
||||||
query = list(query.items())
|
query = list(query.items())
|
||||||
|
|
Loading…
Reference in a new issue