Skip to content

Commit eff8764

Browse files
bozdemir84shs96c
authored andcommitted
Added Locale.US for USER_AGENT toLowerCase (#6491)
USER_AGENT toLowerCase without locale is causing problems with some languages, in may case Turkish. It maps WINDOWS to wındows which is resulting an exception later when it is used because of 'ı' char instead of 'i'. Calling toLowerCase with Locale.US solves this problem.
1 parent d6f4caa commit eff8764

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

java/client/src/org/openqa/selenium/remote/http/HttpClient.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import java.net.URL;
3030
import java.time.Duration;
3131
import java.util.Objects;
32+
import java.util.Locale;
3233

3334
/**
3435
* Defines a simple client for making HTTP requests.
@@ -39,8 +40,8 @@ public interface HttpClient {
3940
"selenium/%s (java %s)",
4041
new BuildInfo().getReleaseLabel(),
4142
(Platform.getCurrent().family() == null ?
42-
Platform.getCurrent().toString().toLowerCase() :
43-
Platform.getCurrent().family().toString().toLowerCase()));
43+
Platform.getCurrent().toString().toLowerCase(Locale.US) :
44+
Platform.getCurrent().family().toString().toLowerCase(Locale.US)));
4445

4546
/**
4647
* Executes the given request, following any redirects if necessary.

0 commit comments

Comments
 (0)