XHTTP client: Avoid panic when host is invalid#6316
Merged
Conversation
Contributor
Author
|
return host多了个空格 现在删掉了 |
Member
|
sanitizeHost 没必要(强行修正非法输入我们一般不这样做) |
Contributor
Author
也就是用户的配置错了直接报错?(不panic) 过几分钟我弄一下 |
bytecategory
commented
Jun 12, 2026
Contributor
Author
|
#6315 (comment) |
Member
|
|
Member
Member
|
服务端我没记错的话只是拿着这个string比较一下 撑死也就没办法连上 属于常规配置错误问题 这个改动只是为了避免panic |
Contributor
Author
看来是没有问题的. |
host is invalid
Maolaohei
added a commit
to Maolaohei/Bray-Core
that referenced
this pull request
Jun 19, 2026
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.
光速解决了 #6315
新增了sanitizeHost 用于把它们规范化成host:port的格式 不过不太健壮 如果还有其它奇怪的输入欢迎提出