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.
说明
针对当前punycode处理完整域名异常问题。当前punycode处理字符正常,但是处理完整域名是不符合punycode要求的。
如:“赵新虎”转码后为“xn--efvz93e52e”,这个是正常的。但是完整域名“赵新虎.中国”转码后为“xn--.-lq6ay5z8yp4o2b37i”,真实完整域名转码为punycode为“xn--efvz93e52e.xn--fiqs8s”,域名中间的“.”是需要特殊处理的。
修改描述(包括说明bug修复或者添加新特性)
1、 针对完整域名处理punycode的不准确性进行了补充。
2、 另外有一个建议:punycode本身就是针对域名来处理的,所以确实需要特殊处理。即原始的encode和decode方法是否可以使用encodeDomain和decodeDomain进行替换?