fix: avoid space in http key

This commit is contained in:
Yeuoly 2024-03-19 18:13:30 +08:00
parent 55d2417906
commit 2f16b3600c
No known key found for this signature in database
GPG Key ID: A66E7E320FB19F61
1 changed files with 3 additions and 3 deletions

View File

@ -187,7 +187,7 @@ class HttpExecutor:
else:
raise ValueError(f'Invalid params {kv}')
self.params[k] = v
self.params[k.strip()] = v
# extract all template in headers
header_template = re.findall(r'{{(.*?)}}', node_data.headers) or []
@ -239,9 +239,9 @@ class HttpExecutor:
continue
kv = kv.split(':')
if len(kv) == 2:
body[kv[0]] = kv[1]
body[kv[0].strip()] = kv[1]
elif len(kv) == 1:
body[kv[0]] = ''
body[kv[0].strip()] = ''
else:
raise ValueError(f'Invalid body {kv}')