Open vdlfvkfdvfdjbs opened 1 week ago
@vdlfvkfdvfdjbs Hello! I'm here to help you with any bugs, questions, or contributions you have for the project.
The issue you're experiencing, where the HTTP Request
block removes the pattern "<|.*?|>"
from JSON/raw text HTTP requests, is not explicitly documented in the codebase. However, it is possible that this behavior is due to some form of sanitization or processing logic applied to the request payload.
To investigate further, you can check the following areas in the codebase:
HttpExecutor Class: This class is responsible for executing HTTP requests and might contain logic that processes or sanitizes the request payload.
api/core/workflow/nodes/http_request/http_executor.py
[1].EditBody Component: This component handles the processing and sanitization of JSON and raw text bodies in the frontend.
web/app/components/workflow/nodes/http/components/edit-body/index.tsx
[2].Unit Tests: There are unit tests that specifically test the handling of special characters or patterns in the HTTP Request
block. These tests might provide insights into how such patterns are processed.
api/tests/integration_tests/workflow/nodes/test_http.py
[3].If you need to address this issue immediately, you might consider adding custom handling for the "<|.*?|>"
pattern in the relevant parts of the codebase. Otherwise, you can report this as a bug to the maintainers for further investigation.
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
0.8.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Create an "HTTP Request" block and send json/raw text that includes r"<|.*?|>" type of string, for example {"text": "hello <|cats|> world"} will be sent as {"text": "hello world"}.
✔️ Expected Behavior
for {"text": "hello <|cats|> world"} to be sent as {"text": "hello <|cats|> world"}
❌ Actual Behavior
{"text": "hello <|cats|> world"} is sent as {"text": "hello world"}