Skip to content

Fixed a crash that occurred after entering @ and /.#6316

Open
bytecategory wants to merge 1 commit into
XTLS:mainfrom
bytecategory:main
Open

Fixed a crash that occurred after entering @ and /.#6316
bytecategory wants to merge 1 commit into
XTLS:mainfrom
bytecategory:main

Conversation

@bytecategory

Copy link
Copy Markdown
Contributor

光速解决了 #6315
新增了sanitizeHost 用于把它们规范化成host:port的格式 不过不太健壮 如果还有其它奇怪的输入欢迎提出

@bytecategory

Copy link
Copy Markdown
Contributor Author

return host多了个空格 现在删掉了

@Fangliding

Copy link
Copy Markdown
Member

sanitizeHost 没必要(强行修正非法输入我们一般不这样做)
只正确处理err返回就行了

@bytecategory

bytecategory commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

sanitizeHost 没必要(强行修正非法输入我们一般不这样做) 只正确处理err返回就行了

也就是用户的配置错了直接报错?(不panic) 过几分钟我弄一下

@bytecategory bytecategory left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

正确处理http.NewRequestWithContext的error返回就不panic了 @和/?都没有 在风扇提醒下找到的更简洁的方案

@bytecategory

Copy link
Copy Markdown
Contributor Author

#6315 (comment)
根据用户反馈 问题已经解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants