feat(hutool-http): 控制请求头是否聚合 - #3883
Merged
Merged
Conversation
Collaborator
|
good job~ |
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.
[新特性] 新增用户控制是否需要聚合请求头为,拼接
根据 HTTP 标准(RFC 7230),对于用户自定义请求头,发送方通常不应发送多个具有相同名称的头,除非其值被定义为逗号分隔列表,但自定义头通常未定义此行为。
我查阅了相关文档,规范中并未对用户自定义的请求做规范;在实践中有服务端支持也有服务端无法支持需要借用插件来完成。
所以增加一个用户可选的是否聚合请求头的操作,用户可选择适配不同服务器,增强 hutool 的实用性,默认为不聚合请求头。