You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"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);
The text was updated successfully, but these errors were encountered:
"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:
Then the following code will return false in Turkey, and so chunked response handling will be broken:
The solution is to always explicitly specify a locale when using
String.toLowerCase()
andString.toUpperCase()
, eg:The text was updated successfully, but these errors were encountered: