Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: http node request detect text/xml as file (#15174)

非法操作99dc8c787148
diff --git a/api/core/workflow/nodes/http_request/entities.py b/api/core/workflow/nodes/http_request/entities.py
index 5764ce725ec..1a231711085 100644
--- a/api/core/workflow/nodes/http_request/entities.py
+++ b/api/core/workflow/nodes/http_request/entities.py
@@ -120,6 +120,10 @@ class Response:
if disp_type == "attachment" or filename is not None:
return True
+ # For 'text/' types, only 'csv' should be downloaded as file
+ if content_type.startswith("text/") and "csv" not in content_type:
+ return False
+
# For application types, try to detect if it's a text-based format
if content_type.startswith("application/"):
# Common text-based application types