Skip to content

Multiple instances of the "Turkish i bug" #361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jroper opened this issue Aug 19, 2013 · 2 comments
Closed

Multiple instances of the "Turkish i bug" #361

jroper opened this issue Aug 19, 2013 · 2 comments
Assignees
Milestone

Comments

@jroper
Copy link
Contributor

jroper commented Aug 19, 2013

"i".toUpperCase() and "I".toLowerCase() are locale dependent, and return different values depending on whether your Locale is Turkish or not. Since in the Turkish locale, the upper case of "i" is a dotted upper case i, that is, "İ", and the lower case of "I" is an undotted lower case i, that is,"ı".

AsyncHttpClient is using these methods all over the place, so for example, if a response has the following header:

TRANSFER-ENCODING: CHUNKED

Then the following code will return false in Turkey, and so chunked response handling will be broken:

headers.containsKey("Transfer-Encoding");

The solution is to always explicitly specify a locale when using String.toLowerCase() and String.toUpperCase(), eg:

value.toLowerCase(Locale.ENGLISH);
@jroper
Copy link
Contributor Author

jroper commented Aug 19, 2013

@slandelle
Copy link
Contributor

@jroper Do you need a release for Play2?

cs-workco pushed a commit to cs-workco/async-http-client that referenced this issue Apr 13, 2023
motivation: test with nightly toolchain

changes: add docker compose setup for ubuntu 20.04 and nightly toolchain
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

No branches or pull requests

2 participants