HTTP Request --- Run failed: url should start with http:// or https:// #12452

Closed
opened 2026-02-21 19:07:29 -05:00 by yindo · 9 comments
Owner

Originally created by @kobolibra on GitHub (Apr 1, 2025).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.1.3

Cloud or Self Hosted

Cloud

Steps to reproduce

http request returned: Run failed: url should start with http:// or https://

I am setting up a chatflow in dify. There is a node with 3 variables (array[object]) as output, with formats looks like below. I used one variable, say short_articles as input to the following iteration node. The intention is to fetch the article contents using http request node. I have attached the setup for the nodes involved. I used {{item.source_url}} as the url configuration in the http request, and it returned Run failed: url should start with http:// or https://. I tried different alternatives for this configuration without success.

Image

Image Image Image Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @kobolibra on GitHub (Apr 1, 2025). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.1.3 ### Cloud or Self Hosted Cloud ### Steps to reproduce http request returned: **Run failed: url should start with http:// or https://** I am setting up a chatflow in dify. There is a node with 3 variables (array[object]) as output, with formats looks like below. I used one variable, say short_articles as input to the following iteration node. The intention is to fetch the article contents using http request node. I have attached the setup for the nodes involved. I used {{item.source_url}} as the url configuration in the http request, and it returned **Run failed: url should start with http:// or https://**. I tried different alternatives for this configuration without success. ![Image](https://github.com/user-attachments/assets/549cbf9e-f97c-43d3-90d8-13308453e173) <img width="1188" alt="Image" src="https://github.com/user-attachments/assets/5d6dc136-e3a0-44f2-b14d-316c3f8136b0" /> <img width="1188" alt="Image" src="https://github.com/user-attachments/assets/2412aa52-c107-49d0-a15d-67314c9e6496" /> <img width="1188" alt="Image" src="https://github.com/user-attachments/assets/8d487e4e-6da1-4eff-9fc0-8d28bb17c5b2" /> <img width="1188" alt="Image" src="https://github.com/user-attachments/assets/07dd314d-5956-49cc-b9d9-a3ff54702e94" /> ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bugstalecloud labels 2026-02-21 19:07:29 -05:00
yindo closed this issue 2026-02-21 19:07:29 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 1, 2025):

I found a similar issue that was previously reported and resolved. The issue titled "get node can't work: url should start with http:// or https://" was closed after a pull request fixed the problem by ensuring that URLs with variables are correctly formatted to start with "http://" or "https://" [1].

To resolve the error "Run failed: url should start with http:// or https://" in your setup, ensure that the {{item.source_url}} variable is correctly formatted to include the protocol prefix "http://" or "https://". This error occurs because the URL validation checks for these prefixes. Verify that the source_url variable is defined with the correct protocol in your chatflow setup. If {{item.source_url}} is dynamically generated or fetched, check its value before using it in the HTTP request node [2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Apr 1, 2025): <!-- Answer --> I found a similar issue that was previously reported and resolved. The issue titled "[get node can't work: url should start with http:// or https://](https://github.com/langgenius/dify/issues/12447)" was closed after a pull request fixed the problem by ensuring that URLs with variables are correctly formatted to start with "http://" or "https://" <sup>[[1]](https://github.com/langgenius/dify/issues/12447)</sup>. To resolve the error "Run failed: url should start with http:// or https://" in your setup, ensure that the `{{item.source_url}}` variable is correctly formatted to include the protocol prefix "http://" or "https://". This error occurs because the URL validation checks for these prefixes. Verify that the `source_url` variable is defined with the correct protocol in your chatflow setup. If `{{item.source_url}}` is dynamically generated or fetched, check its value before using it in the HTTP request node <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/core/workflow/nodes/http_request/executor.py)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/1d937182-6d38-46aa-9fb8-4baa11a65b6c?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/1d937182-6d38-46aa-9fb8-4baa11a65b6c?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/1d937182-6d38-46aa-9fb8-4baa11a65b6c?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/1d937182-6d38-46aa-9fb8-4baa11a65b6c?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/1d937182-6d38-46aa-9fb8-4baa11a65b6c?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/1d937182-6d38-46aa-9fb8-4baa11a65b6c?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/1d937182-6d38-46aa-9fb8-4baa11a65b6c?feedback_type=other)</sup>
Author
Owner

@kobolibra commented on GitHub (Apr 1, 2025):

@hjlarry could you help to take a look and advise? I believed you came across the same earlier and seemed to have fixed it. thank you

@kobolibra commented on GitHub (Apr 1, 2025): @hjlarry could you help to take a look and advise? I believed you came across the same earlier and seemed to have fixed it. thank you
Author
Owner

@hjlarry commented on GitHub (Apr 1, 2025):

can you provide your dsl?

@hjlarry commented on GitHub (Apr 1, 2025): can you provide your dsl?
Author
Owner

@kobolibra commented on GitHub (Apr 2, 2025):

Thank you for the reply. The DSL is not working as expected right now somehow. input https://rentry.co/o5b4ongx in the starting node popup and type go or basically anything to bot. the output from the 2nd node should look like the attached "list”, which is json, and in the 3rd node, i split this json into 3, output formats remain unchanged, and the 4th node is to get a url from each item and fetch the content.

list.docx

Insights (1).yml.zip

@kobolibra commented on GitHub (Apr 2, 2025): Thank you for the reply. The DSL is not working as expected right now somehow. input https://rentry.co/o5b4ongx in the starting node popup and type go or basically anything to bot. the output from the 2nd node should look like the attached "list”, which is json, and in the 3rd node, i split this json into 3, output formats remain unchanged, and the 4th node is to get a url from each item and fetch the content. [list.docx](https://github.com/user-attachments/files/19561508/list.docx) [Insights (1).yml.zip](https://github.com/user-attachments/files/19561489/Insights.1.yml.zip)
Author
Owner

@hjlarry commented on GitHub (Apr 2, 2025):

the 2nd node is not json, it output text

Image

@hjlarry commented on GitHub (Apr 2, 2025): the 2nd node is not json, it output text ![Image](https://github.com/user-attachments/assets/4d735334-1896-4c86-b67e-bf1eea08857f)
Author
Owner

@kobolibra commented on GitHub (Apr 2, 2025):

Thank you @hjlarry

Yes the DSL shared earlier is not working as expected. And please refer to the one attached which is stuck with the url issue. The staring node now required to upload a docx file which is also attached. I now set the url parameter as {{item.source_url}} which is not identified...

Insights (2).yml.zip

list.docx

@kobolibra commented on GitHub (Apr 2, 2025): Thank you @hjlarry Yes the DSL shared earlier is not working as expected. And please refer to the one attached which is stuck with the url issue. The staring node now required to upload a docx file which is also attached. I now set the url parameter as {{item.source_url}} which is not identified... [Insights (2).yml.zip](https://github.com/user-attachments/files/19564654/Insights.2.yml.zip) [list.docx](https://github.com/user-attachments/files/19564658/list.docx)
Author
Owner

@hjlarry commented on GitHub (Apr 2, 2025):

Image

use a code node extract the url

@hjlarry commented on GitHub (Apr 2, 2025): ![Image](https://github.com/user-attachments/assets/6ed39bcb-98ea-4e91-bb99-7d80022d6c19) use a code node extract the url
Author
Owner

@kobolibra commented on GitHub (Apr 2, 2025):

Image

use a code node extract the url

Thank you @hjlarry ! It finally worked! Have a great day ahead!

@kobolibra commented on GitHub (Apr 2, 2025): > ![Image](https://github.com/user-attachments/assets/6ed39bcb-98ea-4e91-bb99-7d80022d6c19) > > use a code node extract the url Thank you @hjlarry ! It finally worked! Have a great day ahead!
Author
Owner

@dosubot[bot] commented on GitHub (May 3, 2025):

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

Issue Summary:

  • You reported a failed HTTP request due to a URL configuration problem.
  • The URL {{item.source_url}} lacked the "http://" or "https://" prefix.
  • @hjlarry suggested using a code node to extract and format the URL.
  • The issue was resolved with this approach.

Next Steps:

  • Please confirm if this issue is still relevant to the latest version of the Dify repository by commenting here.
  • If no further updates are provided, the issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (May 3, 2025): Hi, @kobolibra. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - You reported a failed HTTP request due to a URL configuration problem. - The URL `{{item.source_url}}` lacked the "http://" or "https://" prefix. - @hjlarry suggested using a code node to extract and format the URL. - The issue was resolved with this approach. **Next Steps:** - Please confirm if this issue is still relevant to the latest version of the Dify repository by commenting here. - If no further updates are provided, the 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#12452