From 2f16b3600ce46ebfb027c93e2648e48b209d7806 Mon Sep 17 00:00:00 2001 From: Yeuoly Date: Tue, 19 Mar 2024 18:13:30 +0800 Subject: [PATCH] fix: avoid space in http key --- api/core/workflow/nodes/http_request/http_executor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/core/workflow/nodes/http_request/http_executor.py b/api/core/workflow/nodes/http_request/http_executor.py index 0b11454d3d..daa36bd380 100644 --- a/api/core/workflow/nodes/http_request/http_executor.py +++ b/api/core/workflow/nodes/http_request/http_executor.py @@ -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}')