[PR #119] [MERGED] feat(http_parser): add functions to parse raw HTTP requests and conve… #159

Closed
opened 2026-02-15 21:16:01 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/119
Author: @Yeuoly
Created: 4/27/2025
Status: Merged
Merged: 4/27/2025
Merged by: @Yeuoly

Base: mainHead: chore/add-tests-for-http-parser


📝 Commits (2)

  • 270f295 feat(http_parser): add functions to parse raw HTTP requests and convert Request objects to raw data
  • 2cf8233 apply ruff

📊 Changes

2 files changed (+94 additions, -0 deletions)

View changed files

📝 python/dify_plugin/core/utils/http_parser.py (+40 -0)
python/tests/utils/test_http_parser.py (+54 -0)

📄 Description

…rt Request objects to raw data

  • Implemented parse_raw_request to convert raw HTTP data into a Request object, including support for headers and body.
  • Added convert_request_to_raw_data to transform a Request object back into raw HTTP data.
  • Created unit tests for both functions to ensure correct parsing and conversion behavior.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-sdks/pull/119 **Author:** [@Yeuoly](https://github.com/Yeuoly) **Created:** 4/27/2025 **Status:** ✅ Merged **Merged:** 4/27/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `chore/add-tests-for-http-parser` --- ### 📝 Commits (2) - [`270f295`](https://github.com/langgenius/dify-plugin-sdks/commit/270f29515d7b907dc44472b1577118b5687411b2) feat(http_parser): add functions to parse raw HTTP requests and convert Request objects to raw data - [`2cf8233`](https://github.com/langgenius/dify-plugin-sdks/commit/2cf82334912b0cbfb51c28edf21c90be6ec946c5) apply ruff ### 📊 Changes **2 files changed** (+94 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `python/dify_plugin/core/utils/http_parser.py` (+40 -0) ➕ `python/tests/utils/test_http_parser.py` (+54 -0) </details> ### 📄 Description …rt Request objects to raw data - Implemented `parse_raw_request` to convert raw HTTP data into a Request object, including support for headers and body. - Added `convert_request_to_raw_data` to transform a Request object back into raw HTTP data. - Created unit tests for both functions to ensure correct parsing and conversion behavior. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 21:16:01 -05:00
yindo closed this issue 2026-02-15 21:16:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-sdks#159