Merge branch '6.1.x'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -72,7 +72,7 @@ public class WebSocketExtension {
|
||||
Assert.hasLength(name, "Extension name must not be empty");
|
||||
this.name = name;
|
||||
if (!CollectionUtils.isEmpty(parameters)) {
|
||||
Map<String, String> map = new LinkedCaseInsensitiveMap<>(parameters.size(), Locale.ENGLISH);
|
||||
Map<String, String> map = new LinkedCaseInsensitiveMap<>(parameters.size(), Locale.ROOT);
|
||||
map.putAll(parameters);
|
||||
this.parameters = Collections.unmodifiableMap(map);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -42,7 +42,7 @@ public class StandardToWebSocketExtensionAdapter extends WebSocketExtension {
|
||||
|
||||
private static Map<String, String> initParameters(Extension extension) {
|
||||
List<Extension.Parameter> parameters = extension.getParameters();
|
||||
Map<String, String> result = new LinkedCaseInsensitiveMap<>(parameters.size(), Locale.ENGLISH);
|
||||
Map<String, String> result = new LinkedCaseInsensitiveMap<>(parameters.size(), Locale.ROOT);
|
||||
for (Extension.Parameter parameter : parameters) {
|
||||
result.put(parameter.getName(), parameter.getValue());
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ public class StandardWebSocketClient extends AbstractWebSocketClient {
|
||||
|
||||
private static int getPort(URI uri) {
|
||||
if (uri.getPort() == -1) {
|
||||
String scheme = uri.getScheme().toLowerCase(Locale.ENGLISH);
|
||||
String scheme = uri.getScheme().toLowerCase(Locale.ROOT);
|
||||
return ("wss".equals(scheme) ? 443 : 80);
|
||||
}
|
||||
return uri.getPort();
|
||||
|
||||
Reference in New Issue
Block a user