Revert "better path query parsing in fileserver"

This reverts commit 29a023aaad.

This causes breakage outlined in #26839
This commit is contained in:
Mike Place 2015-09-08 14:47:50 -06:00
parent 24eec1babb
commit 8b6a7b0d65

View File

@ -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',