refactor(http-message): remove laminas/laminas-mime dependency and replace with custom parser#10
Closed
october-moon wants to merge 1 commit intohyperf:masterfrom
Closed
refactor(http-message): remove laminas/laminas-mime dependency and replace with custom parser#10october-moon wants to merge 1 commit intohyperf:masterfrom
october-moon wants to merge 1 commit intohyperf:masterfrom
Conversation
…oser.json 中的 laminas/laminas-mime 依赖 - 新增 Hyperf\HttpMessage\Util\HeaderFieldParser 工具类- 实现 splitHeaderField 方法替代原有的 Decode::splitHeaderField - 添加 splitContentType 便捷方法用于解析 Content-Type 头部 - 在 MessageTrait 中使用新的 HeaderFieldParser 类 - 添加完整的单元测试覆盖各种解析场景 - 支持解析带引号的值和大小写不敏感的参数名 - 提供对 multipart 边界和 Content-Disposition 头部的解析支持
|
Hi, this is a READ-ONLY repository, please submit your PR on the https://github.com/hyperf/hyperf repository. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
Remove the external laminas/laminas-mime dependency and replace it with a custom HeaderFieldParser utility class to reduce external dependencies while maintaining full compatibility with existing functionality.
🔄 Changes
✨ Benefits
🧪 Testing
Added comprehensive unit tests to ensure all parsing scenarios work correctly, including edge cases with quoted values, different parameter formats, and various header types.
📋 Checklist