If the string assignment didn't work either, give up without failing (also in Request)

This commit is contained in:
Fabio Manganiello 2018-06-14 19:12:16 +02:00
parent 4d48506cb2
commit 061b676fbc

View file

@ -109,7 +109,11 @@ class Request(Message):
try: try:
exec('{}={}'.format(k, v)) exec('{}={}'.format(k, v))
except: except:
exec('{}="{}"'.format(k, v)) if isinstance(v, str):
try:
exec('{}="{}"'.format(k, re.sub('(^|[^\\\])"', '\1\\"', v)))
except:
pass
parsed_value = '' parsed_value = ''
while value: while value: