mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
set allow_fragments to False
This commit is contained in:
parent
2868ac1f89
commit
e8c3bdb482
1 changed files with 1 additions and 3 deletions
|
@ -481,11 +481,9 @@ class Client:
|
|||
"""
|
||||
Get a single file from a URL.
|
||||
"""
|
||||
url = urllib.parse.quote(url, safe=":/")
|
||||
url_data = urllib.parse.urlparse(url)
|
||||
url_data = urllib.parse.urlparse(url, allow_fragments=False)
|
||||
url_scheme = url_data.scheme
|
||||
url_path = os.path.join(url_data.netloc, url_data.path).rstrip(os.sep)
|
||||
url_path = urllib.parse.unquote(url_path)
|
||||
|
||||
# If dest is a directory, rewrite dest with filename
|
||||
if dest is not None and (os.path.isdir(dest) or dest.endswith(("/", "\\"))):
|
||||
|
|
Loading…
Add table
Reference in a new issue