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
1 changed files with 5 additions and 1 deletions

View File

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