HTTP Request Node Not Retrieve File Extension from Content-Disposition Header #15517

Closed
opened 2026-02-21 19:22:05 -05:00 by yindo · 1 comment
Owner

Originally created by @ChenMartin on GitHub (Jul 20, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

Version 1.6.0

Cloud or Self Hosted

Cloud

Steps to reproduce

Problem description

I use the cloud version of Dify to create a workflow (version is Version 1.6.0).
When using HTTP Request Node to request an RSS news feed, the result is responded to in xml format. However, the HTTP Request Node recognizes that the file type in the response is .xsl. So when using doc extractor, I get an error Unsupported Extension Type: .xsl.

Workflow Info

Image

HTTP Request Node

PROCESS DATA

{
  "request": "GET /rss HTTP/1.1\r\nHost: www.ransomware.live\r\n\r\n"
}

OUTPUT

{
  "status_code": 200,
  "body": "",
  "headers": {
    "server": "nginx",
    "date": "Mon, 21 Jul 2025 02:19:10 GMT",
    "content-type": "application/xml; charset=utf-8",
    "content-length": "150543",
    "connection": "keep-alive",
    "content-disposition": "inline; filename=rss.xml",
    "last-modified": "Mon, 21 Jul 2025 01:27:40 GMT",
    "cache-control": "no-cache",
    "etag": "\"1753061260.3607368-150543-656871055\""
  },
  "files": [
    {
      "dify_model_identity": "__dify__file__",
      "id": null,
      "tenant_id": "9024b8ec-023a-4beb-b01f-22db8b5ca2ec",
      "type": "custom",
      "transfer_method": "tool_file",
      "remote_url": null,
      "related_id": "52888073-9db9-4e9a-a9e6-7af91e5bac01",
      "filename": "be0b6dfde9844e6e9eb62418626f7755.xsl",
      "extension": ".xsl",
      "mime_type": "application/xml",
      "size": 150543,
      "url": "https://upload.dify.ai/files/tools/52888073-9db9-4e9a-a9e6-7af91e5bac01.xsl?timestamp=1753064350&nonce=041e4d59c39eced847fd6a68a920de16&sign=zZzGWRwFRfn8k20xS0lbjBjSfDH_SrcwpgTu30EPtDA="
    }
  ]
}

Doc extractor Node

Image

INPUT

{
  "variable_selector": [
    "1752910060474",
    "files"
  ]
}

PROCESS DATA

{
  "documents": [
    {
      "dify_model_identity": "__dify__file__",
      "id": null,
      "tenant_id": "9024b8ec-023a-4beb-b01f-22db8b5ca2ec",
      "type": "custom",
      "transfer_method": "tool_file",
      "remote_url": null,
      "related_id": "52888073-9db9-4e9a-a9e6-7af91e5bac01",
      "filename": "be0b6dfde9844e6e9eb62418626f7755.xsl",
      "extension": ".xsl",
      "mime_type": "application/xml",
      "size": 150543,
      "url": "https://upload.dify.ai/files/tools/52888073-9db9-4e9a-a9e6-7af91e5bac01.xsl?timestamp=1753064350&nonce=f69ac748354fb23caa0727657e67f362&sign=MIix-3zFPTyCJKj1WKYUY7mEtxHIIG5ME9kuqvyyCT8="
    }
  ]
}

"doc extractor" data handle error :

Unsupported Extension Type: .xsl

Image

OUTPUT is {}

code execute Node

Read the contents of the xml file and return to the news list

import xml.etree.ElementTree as ET

def main(response_body: list[str]) -> dict:
    news_list = []
    root = ET.fromstring(response_body[0])
    for news in root.findall('channel/item'):
        news_dict = {}
        news_dict['title'] = news.find('title').text
        news_dict['link'] = news.find('link').text
        news_dict['description'] = news.find('description').text
        news_dict['image'] = news.find('image').text
        news_dict['guid'] = news.find('guid').text
        news_dict['enclosure'] = news.find('enclosure').text
        news_dict['category'] = news.find('category').text
        news_dict['pubDate'] = news.find('pubDate').text
        news_list.append(news_dict)
    return {'result': news_list}

✔️ Expected Behavior

The file format in "mime_type": "application/xml" is correctly identified by HTTP Request Node, and the xml file is correctly read by doc extractor.
so,I hope he will be able to parse the xml normally
file
, or don't store it as a file, just let me read the string in the HTTP response body and parse it through python

Actual Behavior

The HTTP Request Node identifies the file format as .xsl instead of the xml file, and fails to read the xsl file through the doc extractor, and the file content cannot be read in subsequent code processing

Originally created by @ChenMartin on GitHub (Jul 20, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version Version 1.6.0 ### Cloud or Self Hosted Cloud ### Steps to reproduce # Problem description I use the cloud version of Dify to create a workflow (version is Version 1.6.0). When using HTTP Request Node to request an RSS news feed, the result is responded to in xml format. However, the HTTP Request Node recognizes that the file type in the response is .xsl. So when using doc extractor, I get an error Unsupported Extension Type: .xsl. # Workflow Info <img width="1905" height="910" alt="Image" src="https://github.com/user-attachments/assets/53ba259c-78a2-4a97-b504-033b3d8834b7" /> * rss feed *:https://www.ransomware.live/rss ## HTTP Request Node ### PROCESS DATA ``` { "request": "GET /rss HTTP/1.1\r\nHost: www.ransomware.live\r\n\r\n" } ``` ### OUTPUT ``` { "status_code": 200, "body": "", "headers": { "server": "nginx", "date": "Mon, 21 Jul 2025 02:19:10 GMT", "content-type": "application/xml; charset=utf-8", "content-length": "150543", "connection": "keep-alive", "content-disposition": "inline; filename=rss.xml", "last-modified": "Mon, 21 Jul 2025 01:27:40 GMT", "cache-control": "no-cache", "etag": "\"1753061260.3607368-150543-656871055\"" }, "files": [ { "dify_model_identity": "__dify__file__", "id": null, "tenant_id": "9024b8ec-023a-4beb-b01f-22db8b5ca2ec", "type": "custom", "transfer_method": "tool_file", "remote_url": null, "related_id": "52888073-9db9-4e9a-a9e6-7af91e5bac01", "filename": "be0b6dfde9844e6e9eb62418626f7755.xsl", "extension": ".xsl", "mime_type": "application/xml", "size": 150543, "url": "https://upload.dify.ai/files/tools/52888073-9db9-4e9a-a9e6-7af91e5bac01.xsl?timestamp=1753064350&nonce=041e4d59c39eced847fd6a68a920de16&sign=zZzGWRwFRfn8k20xS0lbjBjSfDH_SrcwpgTu30EPtDA=" } ] } ``` ## Doc extractor Node <img width="1912" height="914" alt="Image" src="https://github.com/user-attachments/assets/1ffbe549-e3fc-46fb-8cca-10effd1246ad" /> ### INPUT ``` { "variable_selector": [ "1752910060474", "files" ] } ``` ### PROCESS DATA ``` { "documents": [ { "dify_model_identity": "__dify__file__", "id": null, "tenant_id": "9024b8ec-023a-4beb-b01f-22db8b5ca2ec", "type": "custom", "transfer_method": "tool_file", "remote_url": null, "related_id": "52888073-9db9-4e9a-a9e6-7af91e5bac01", "filename": "be0b6dfde9844e6e9eb62418626f7755.xsl", "extension": ".xsl", "mime_type": "application/xml", "size": 150543, "url": "https://upload.dify.ai/files/tools/52888073-9db9-4e9a-a9e6-7af91e5bac01.xsl?timestamp=1753064350&nonce=f69ac748354fb23caa0727657e67f362&sign=MIix-3zFPTyCJKj1WKYUY7mEtxHIIG5ME9kuqvyyCT8=" } ] } ``` ### "doc extractor" data handle error : Unsupported Extension Type: .xsl <img width="1918" height="926" alt="Image" src="https://github.com/user-attachments/assets/e161ba30-7533-4ede-90dc-e6bf2cebb2a6" /> OUTPUT is {} ## code execute Node Read the contents of the xml file and return to the news list ``` python3 import xml.etree.ElementTree as ET def main(response_body: list[str]) -> dict: news_list = [] root = ET.fromstring(response_body[0]) for news in root.findall('channel/item'): news_dict = {} news_dict['title'] = news.find('title').text news_dict['link'] = news.find('link').text news_dict['description'] = news.find('description').text news_dict['image'] = news.find('image').text news_dict['guid'] = news.find('guid').text news_dict['enclosure'] = news.find('enclosure').text news_dict['category'] = news.find('category').text news_dict['pubDate'] = news.find('pubDate').text news_list.append(news_dict) return {'result': news_list} ``` ### ✔️ Expected Behavior The file format in "mime_type": "application/xml" is correctly identified by HTTP Request Node, and the xml file is correctly read by doc extractor. so,I hope he will be able to **parse the xml normally file**, or **don't store it as a file**, just let me read the string in the HTTP response body and parse it through python ### ❌ Actual Behavior The HTTP Request Node identifies the file format as .xsl instead of the xml file, and fails to read the xsl file through the doc extractor, and the file content cannot be read in subsequent code processing
yindo added the 🌊 feat:workflow label 2026-02-21 19:22:05 -05:00
yindo closed this issue 2026-02-21 19:22:06 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 24, 2025):

Hi, @ChenMartin. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported that in Dify version 1.6.0 cloud, the HTTP Request Node incorrectly identifies the file extension as .xsl instead of .xml from the Content-Disposition header when fetching an RSS feed.
  • This misidentification causes the document extractor to throw an "Unsupported Extension Type: .xsl" error.
  • The response's content-type is "application/xml" and the filename in the header is "rss.xml," indicating the extension should be .xml.
  • No further comments or updates have been provided on this issue.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here to keep the discussion open.
  • Otherwise, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 24, 2025): Hi, @ChenMartin. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported that in Dify version 1.6.0 cloud, the HTTP Request Node incorrectly identifies the file extension as .xsl instead of .xml from the Content-Disposition header when fetching an RSS feed. - This misidentification causes the document extractor to throw an "Unsupported Extension Type: .xsl" error. - The response's content-type is "application/xml" and the filename in the header is "rss.xml," indicating the extension should be .xml. - No further comments or updates have been provided on this issue. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here to keep the discussion open. - Otherwise, this issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#15517