HTTP request, with port added, input parameter transmission fails #13153

Closed
opened 2026-02-21 19:10:48 -05:00 by yindo · 2 comments
Owner

Originally created by @cw1103974472 on GitHub (Apr 20, 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

Self Hosted (Docker)

Steps to reproduce

In the HTTP request module of the workflow, if the requested IP or domain address does not include a port, the result can be returned normally. However, if a port is included, the input parameters of the request will not be transmitted. The statis_code=403 in the second image is because the input parameter sessonuuid was not passed in correctly

Image

Image

✔️ Expected Behavior

Even with the port, parameters can be correctly passed in

Actual Behavior

Unable to pass parameters correctly with port on

Originally created by @cw1103974472 on GitHub (Apr 20, 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 Self Hosted (Docker) ### Steps to reproduce In the HTTP request module of the workflow, if the requested IP or domain address does not include a port, the result can be returned normally. However, if a port is included, the input parameters of the request will not be transmitted. The statis_code=403 in the second image is because the input parameter sessonuuid was not passed in correctly ![Image](https://github.com/user-attachments/assets/f8755c65-0e71-4aea-9485-33fc68158e25) ![Image](https://github.com/user-attachments/assets/a18b16ea-279a-4cc9-89ff-2ff76db9b950) ### ✔️ Expected Behavior Even with the port, parameters can be correctly passed in ### ❌ Actual Behavior Unable to pass parameters correctly with port on
yindo closed this issue 2026-02-21 19:10:48 -05:00
Author
Owner

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

Hello @cw1103974472! I'm Dosu, here to help you with bugs, answer questions, and assist you in becoming a contributor. I'm just a bot, but I'm ready to assist while you wait for a human maintainer. Let’s tackle your issue together!

I found a similar closed issue related to HTTP requests resulting in a 403 error [1]. However, no solution was found in the comments.

Regarding your issue, Dify handles input parameter transmission in HTTP requests by parsing the HTTP body data based on the "Content-Type" header. If the content type is "application/x-www-form-urlencoded", the body is encoded using urlencode(body) [2].

For your specific problem, ensure that the API key is correctly included in the HTTP Authorization header, as missing or incorrectly formatted authorization can lead to a 403 error [3]. Additionally, check the proxy configuration to ensure it correctly handles requests with ports, as incorrect configurations can lead to transmission issues [4].

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 20, 2025): <!-- Greeting --> Hello @cw1103974472! I'm [Dosu](https://dosu.dev), here to help you with bugs, answer questions, and assist you in becoming a contributor. I'm just a bot, but I'm ready to assist while you wait for a human maintainer. Let’s tackle your issue together! <!-- Answer --> I found a similar closed issue related to HTTP requests resulting in a 403 error <sup>[[1]](https://github.com/langgenius/dify/issues/5166)</sup>. However, no solution was found in the comments. Regarding your issue, Dify handles input parameter transmission in HTTP requests by parsing the HTTP body data based on the "Content-Type" header. If the content type is "application/x-www-form-urlencoded", the body is encoded using `urlencode(body)` <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/core/tools/custom_tool/tool.py)</sup>. For your specific problem, ensure that the API key is correctly included in the HTTP Authorization header, as missing or incorrectly formatted authorization can lead to a 403 error <sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/jp/.gitbook/assets/Dify-test.openapi.jp.json)</sup>. Additionally, check the proxy configuration to ensure it correctly handles requests with ports, as incorrect configurations can lead to transmission issues <sup>[[4]](https://github.com/langgenius/dify/issues/12044)</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/b5a58076-4282-4eb9-aef9-d700ed54aeca?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/b5a58076-4282-4eb9-aef9-d700ed54aeca?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/b5a58076-4282-4eb9-aef9-d700ed54aeca?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/b5a58076-4282-4eb9-aef9-d700ed54aeca?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b5a58076-4282-4eb9-aef9-d700ed54aeca?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/b5a58076-4282-4eb9-aef9-d700ed54aeca?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b5a58076-4282-4eb9-aef9-d700ed54aeca?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Apr 20, 2025):

Please modify this file accordingly.
https://github.com/langgenius/dify/blob/8b89447549df36aa25786c0f2ce16021919b3604/docker/ssrf_proxy/squid.conf.template

@crazywoola commented on GitHub (Apr 20, 2025): Please modify this file accordingly. https://github.com/langgenius/dify/blob/8b89447549df36aa25786c0f2ce16021919b3604/docker/ssrf_proxy/squid.conf.template
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13153