浏览代码

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

tags/1.0.1
非法操作 8 个月前
父节点
当前提交
99dc8c7871
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      api/core/workflow/nodes/http_request/entities.py

+ 4
- 0
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

正在加载...
取消
保存