From cdb6c801c10f268a5dc9e0679fc7aef9a68f1ca8 Mon Sep 17 00:00:00 2001 From: th3n00b13 <57221812+th3n00b13@users.noreply.github.com> Date: Fri, 14 Jun 2024 21:07:22 +0900 Subject: [PATCH] Fix: http_request delete method not working (#4975) --- api/core/workflow/nodes/http_request/http_executor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/core/workflow/nodes/http_request/http_executor.py b/api/core/workflow/nodes/http_request/http_executor.py index 10002216f1..74a6c5b9de 100644 --- a/api/core/workflow/nodes/http_request/http_executor.py +++ b/api/core/workflow/nodes/http_request/http_executor.py @@ -42,7 +42,10 @@ class HttpExecutorResponse: return any(v in content_type for v in file_content_types) def get_content_type(self) -> str: - return self.headers.get('content-type') + if 'content-type' in self.headers: + return self.headers.get('content-type') + else: + return self.headers.get('Content-Type') or "" def extract_file(self) -> tuple[str, bytes]: """