mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Revert "better path query parsing in fileserver"
This reverts commit 29a023aaad
.
This causes breakage outlined in #26839
This commit is contained in:
parent
24eec1babb
commit
8b6a7b0d65
@ -13,8 +13,6 @@ import re
|
||||
import time
|
||||
|
||||
# Import salt libs
|
||||
from salt.ext.six.moves.urllib.parse import urlparse as _urlparse # pylint: disable=import-error,no-name-in-module
|
||||
from salt.ext.six.moves.urllib.parse import parse_qs as _parse_qs # pylint: disable=import-error,no-name-in-module
|
||||
import salt.loader
|
||||
import salt.utils
|
||||
import salt.utils.locales
|
||||
@ -458,10 +456,16 @@ class Fileserver(object):
|
||||
# don't attempt to find URL query arguements in the path
|
||||
path = salt.utils.url.unescape(path)
|
||||
else:
|
||||
split_path = _urlparse(path)
|
||||
path = split_path.path
|
||||
query = _parse_qs(split_path.query)
|
||||
kwargs.update(query)
|
||||
if '?' in path:
|
||||
hcomps = path.split('?')
|
||||
path = hcomps[0]
|
||||
comps = hcomps[1].split('&')
|
||||
for comp in comps:
|
||||
if '=' not in comp:
|
||||
# Invalid option, skip it
|
||||
continue
|
||||
args = comp.split('=', 1)
|
||||
kwargs[args[0]] = args[1]
|
||||
if 'env' in kwargs:
|
||||
salt.utils.warn_until(
|
||||
'Boron',
|
||||
|
Loading…
Reference in New Issue
Block a user