Allow non-string values to be passed through a request context as well

This commit is contained in:
Fabio Manganiello 2018-12-03 22:52:25 +01:00
parent 9421602e81
commit 4a148971b4

View file

@ -126,7 +126,10 @@ class Request(Message):
pass pass
parsed_value = '' parsed_value = ''
while value: if not isinstance(value, str):
parsed_value = value
while value and isinstance(value, str):
m = re.match('([^\$]*)(\${\s*(.+?)\s*})(.*)', value) m = re.match('([^\$]*)(\${\s*(.+?)\s*})(.*)', value)
if m and not m.group(1).endswith('\\'): if m and not m.group(1).endswith('\\'):
prefix = m.group(1); expr = m.group(2); prefix = m.group(1); expr = m.group(2);