Merge pull request #3137 from dromara/revert-3127-v5-dev

Revert "punycode中大写字母解码异常问题修复,统一编码和解码为小写"
This commit is contained in:
Golden Looly 2023-06-08 17:16:39 +08:00 committed by GitHub
commit 6480a3bcf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,6 @@ public class PunyCode {
*/ */
public static String encodeDomain(String domain) throws UtilException { public static String encodeDomain(String domain) throws UtilException {
Assert.notNull(domain, "domain must not be null!"); Assert.notNull(domain, "domain must not be null!");
domain = domain.toLowerCase();
final List<String> split = StrUtil.split(domain, CharUtil.DOT); final List<String> split = StrUtil.split(domain, CharUtil.DOT);
final StringBuilder result = new StringBuilder(domain.length() * 4); final StringBuilder result = new StringBuilder(domain.length() * 4);
for (final String str : split) { for (final String str : split) {
@ -157,7 +156,6 @@ public class PunyCode {
*/ */
public static String decodeDomain(String domain) throws UtilException { public static String decodeDomain(String domain) throws UtilException {
Assert.notNull(domain, "domain must not be null!"); Assert.notNull(domain, "domain must not be null!");
domain = domain.toLowerCase();
final List<String> split = StrUtil.split(domain, CharUtil.DOT); final List<String> split = StrUtil.split(domain, CharUtil.DOT);
final StringBuilder result = new StringBuilder(domain.length() / 4 + 1); final StringBuilder result = new StringBuilder(domain.length() / 4 + 1);
for (final String str : split) { for (final String str : split) {