[PR #6135] fix: when http request body is raw or json, if there are line breaks and double quotes, the request will fail #25167

Closed
opened 2026-02-21 20:24:25 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/6135

State: closed
Merged: No


Description

My workflow is to send the output of the large model to an external API via http request node,when http request body is raw or json, if there are line breaks and double quotes, the request will fail.

image image

I found that the error was caused by multi-line text or double quotes
image

Checklist:

Important

Please review the checklist below before submitting your pull request.

  • Please open an issue before creating a PR or link to an existing issue
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Fixes

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update, included: Dify Document
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade
**Original Pull Request:** https://github.com/langgenius/dify/pull/6135 **State:** closed **Merged:** No --- # Description My workflow is to send the output of the large model to an external API via http request node,when http request body is raw or json, if there are line breaks and double quotes, the request will fail. <img width="522" alt="image" src="https://github.com/langgenius/dify/assets/8756642/d344b562-7136-405f-8d16-9d92b92ca91c"> <img width="342" alt="image" src="https://github.com/langgenius/dify/assets/8756642/4926203f-169b-40c8-8152-787d441ac94f"> I found that the error was caused by multi-line text or double quotes <img width="524" alt="image" src="https://github.com/langgenius/dify/assets/8756642/6645cdee-3be5-4f79-9bee-f72a2ffea539"> # Checklist: > [!IMPORTANT] > Please review the checklist below before submitting your pull request. - [ ] Please open an issue before creating a PR or link to an existing issue - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods Fixes ## Type of Change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [ ] Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement - [ ] Dependency upgrade
yindo added the pull-request label 2026-02-21 20:24:25 -05:00
yindo closed this issue 2026-02-21 20:24:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#25167